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

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.

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.