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 do you mean by a JVM?
How to re-get an object that is collected by garbage collector?
State some advantages of java?
What is substring 1 in java?
What is anonymous inner class?
What is the difference between instanceof and isinstance?
How to read and write image from a file ?
How does the garbage collector works in java?
Is java 9 released?
Why do we need hashmap in java?
I have one POJO class(Java bean class), it has two variables for that it has setters and getters. Now i have created two objects for that class and i have set the data for those variables through this two objects. Now question is i want check whether those two objects have same data or not, for this write a program? Thanks, Bose.
What is the difference between the Reader/Writer class hierarchy and the InputStream/OutputStream class hierarchy?