Win a copy of The Java Performance Companion this week in the Performance forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

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

 
manasa manogna
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.
 
Junilu Lacar
Bartender
Posts: 7482
50
Android Eclipse IDE IntelliJ IDE Java Linux Mac Scala Spring Ubuntu
  • 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.
 
Pat Farrell
Rancher
Posts: 4678
7
Linux Mac OS X VI Editor
  • 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.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic