how can u apply shallow cloning and deep cloning to create
object?
Answer Posted / kiran sonaje
Hi,
Please refer below link for shallow cloning
http://www.java2s.com/Code/Java/Language-
Basics/ShallowCopyTest.htm
and for deep cloing
http://www.java2s.com/Code/Java/Language-
Basics/DeepCopyTest.htm
Please please observe clone method to get more
clarification between deep and shallow cloning
| Is This Answer Correct ? | 2 Yes | 3 No |
Post New Answer View All Answers
What is native code?
What is a private class in java?
What is meant by inheritance and what are its advantages?
What is private protected in java?
What is the point of polymorphism java?
How does split work in java?
What is array pointers ?
What is the purpose of final keyword and when to use it?
Why parsing is done?
What will happen if non-synchronized method calls a static synchronized method and what kind of lock it acquires?
Why can we not override static method?
Where is singleton pattern used?
What are identifiers in java?
What are different types of inner classes ?
How does enum work in java?