• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Paul Clapham
  • Liutauras Vilda
  • Knute Snortum
  • Bear Bibeault
Sheriffs:
  • Devaka Cooray
  • Jeanne Boyarsky
  • Junilu Lacar
Saloon Keepers:
  • Ron McLeod
  • Stephan van Hulst
  • Tim Moores
  • Carey Brown
  • salvin francis
Bartenders:
  • Tim Holloway
  • Piet Souris
  • Frits Walraven

Exact difference between deep copy and shallow copy with real time example

 
Greenhorn
Posts: 23
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi Friends

Recently, in an interview, I faced a question like what is the difference between deep copy and shallow copy. And they asked to give a real time example of this concept usage. Can you please help me to know the exact difference between Deep copy and Shallow copy with a real time example.
 
Sheriff
Posts: 15042
251
Mac Android IntelliJ IDE Eclipse IDE Spring Debian Java Ubuntu Linux
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Please try to do a SearchFirst (←click) because there are a number of previous threads in these forums that you might find useful. Try to look at some Google search results for "deep copy in Java" as well. Come back if you have more specific questions.
 
Rancher
Posts: 4686
7
Mac OS X VI Editor Linux
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator

manasa manogna wrote: a real time example of this



Do you really mean to use the term "real time" here?
Or perhaps you are trying to get a real world example?

In programming and computer science, "real time" is a very specialized term with precise meanings.
 
Check your pockets for water buffalo. You might need to use this tiny ad until locate a water buffalo:
Java file APIs (DOC, XLS, PDF, and many more)
https://products.aspose.com/total/java
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!