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 immutable class in java?
How to sort elements in a parallel array in java?
What is the full meaning of java?
What do you mean by ternary operator in java?
Can an integer be null java?
What is a null check?
Is hashset ordered?
What are the supported platforms by java programming language?
What are the data types supported by java? What is autoboxing and unboxing?
Does substring start with 0?
What is incompatible types in java?
What is method reference?
Does java support function overloading, pointers, structures, unions or linked lists?
How do you check whether the list is empty or not in java?
What is codebase?