how can u apply shallow cloning and deep cloning to create
object?



how can u apply shallow cloning and deep cloning to create object?..

Answer / 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

More Core Java Interview Questions

What are three types of loops in java?

0 Answers  


What is a nonetype?

0 Answers  


Differences between C and Java?

0 Answers   TCS,


What is instance means in java?

0 Answers  


Can there be an abstract method without an abstract class?

0 Answers  






What about features of local inner class?

0 Answers  


What is canonical name in java?

0 Answers  


Can we have multiple classes in single file ?

0 Answers  


What is the difference between member variables initialization and assignment in a constructor?

0 Answers   Hexaware, Virtusa,


What is the major difference between linkedlist and arraylist?

0 Answers  


What primitive Java types? Howmany are they and what are their names?

3 Answers  


What is api data?

0 Answers  


Categories