Today's Question:  What does your personal desk look like?        GIVE A SHOUT

 ALL


  What does super.clone() do?

Object class has a protected clone() method declared to make it possible for all classes make a clone of itself when needed. The clone() is often used when a new instance of the class is needed while at the same time to maintain the same state as the original object. Any class which wants to have clone enabled has to implement the marker interface Cloneable.If a class which implements Cloneable doesn't override the Object.clone() method, the Object.clone() method will be called to just make a binary copy of the original, which amounts to a shallow clone, with all the referenced objects staying...

28,381 0       JAVA CLONEABLE SUPER.CLONE() CLONE