8.5 GCV Methods

The following table contains a list of GCV methods:

Element

Description

clone ()

Creates and returns a copy of an object.

equals ()

Indicates whether some other object is equal to this object.

finalize ()

Called by the garbage collector on an object when garbage collection determines that there are no more references to the object.

getClass ()

Returns the run-time class of an object.

hashCode ()

Returns the hash code value for the object.

notify ()

Wakes up a single thread that is waiting for this object monitor.

notifyAll ()

Wakes up all threads that are waiting for this object monitor.

toString ()

Returns a string representation of the object.

wait ()

Causes the current thread to wait until another thread invokes the notify() method or the notifyAll() method for this object.

wait (long timeout)

Causes the current thread to wait until either another thread invokes the notify() method or the notifyAll() method for this object, or a specified amount of time has elapsed.

wait (long timeout, int nanos)

Causes the current thread to wait until another thread invokes the notify() method or the notifyAll() method for this object, some other thread interrupts the current thread, or a certain amount of real time has elapsed.