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 |
What are the differences between wait() and sleep()?
class A{ some variables; public void a()throws Excepion1,Exception2{....} } class B extends A{ variables... public void a()throws E2,E3{.....} } Qns: here override of methods occurs or not,ore else wil give any compilation error or run properly..plz tell me briefly whts happening with the above codes....
What is main difference between variable and constant?
What is Java Reflection API? Why it’s so important to have?
What are concepts of OOPS and how are they implemented in Java?
What are the kinds of polymorphism?
What are the features in java?
Differentiate between stringbuffer and string?
How to make class immutable
What are the two environment variables that must be set in order to run any java programs?
What is methodological theory?
What is entry in java?