-
public Object clone() throws CloneNotSupportedException, OutOfMemoryError
- Creates a new object of the same class as this object. References are copied as references and will point to the same object. To prevent this,
clone can be overwritten ( implement Clonable interface).
-
public boolean equals(Object other)
- Compares two Objects for equality. Should be overwritten if a class
uses references (recursive call
equals to contained classes).
-
protected void finalize() throws Throwable
- Destructor method. Called by the garbage collector on an object when garbage collection
determines that there are no more references to the object. Empty, should be overwritten, when needed.
-
public String toString()
- Returns a string representation of the object. Often used for debugging. Contains the name and qualifying parameters. (Should be overwritten.)
-
public final Class getClass()
- Returns the runtime class of an object. See
Class
|