The java.lang.Object
class is the ultimate superclass
of all objects If a class does not explicitly extend a class, then
the compiler assumes it extends java.lang.Object
.
There is one exception. Guesses?
java.lang.Object
provides a number of methods that are
common to all objects. toString()
is the most common
such method. Since the default toString()
method only
produces the name of the class, you should override it in all
classes you define.
public Object()
public final Class getClass()
public int hashCode()
public boolean equals(Object obj)
protected Object clone() throws
CloneNotSupportedException
public String toString()
public final void notify()
public final void notifyAll()
public final void wait(long timeout) throws
InterruptedException
public final void wait(long timeout, int nanoseconds) throws
InterruptedException
public final void wait() throws
InterruptedException
protected void finalize() throws Throwable