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 are the differences between Java 1.0 and Java 2.0?
what is mutual exclusion? How can you take care of mutual exclusion using java threads? : Java thread
What is hashmap in java?
Can we use return in constructor?
How to perform selection sort in java?
Can we define a package statement after the import statement in java?
How can a gui component handle its own events in java programming?
How do we access static members in java?
What is parsing in java?
Can you give names of Container classes?
What are disadvantages of java?
What is backdrop?
What are the Main functions of Java?
What are the drawbacks for singleton class?
Can we clone singleton class in java?