Thank You so much!!
Type: Posts; User: sravya
Thank You so much!!
But without calling the constructor how does it create an object? if it calls the constructor why calling clone() in the above example (CloningEx ce1 = (CloningEx)ce.clone() ; ) did not print the...
Hi,
Thanks for the reply. I shall give you an example.
public class CloningEx implements Cloneable{
int b;
CloningEx(){
System.out.println("Default constructor");
}
Hi,
I heard that clone() method in java creates a copy of an object without calling the constructor. how does it create an another object without calling the constructor? i tried looking into...