Object.equals

Object.equals

Class Overview | Class Members | This Package | All Packages

Syntax
public boolean equals( Object obj )
Parameters
obj
the reference object with which to compare.
Returns
true if this object is the same as the obj argument; false otherwise.
Description
Compares two Objects for equality.

The equals method implements an equivalence relation:

The equals method for class Object implements the most discriminating possible equivalence relation on objects; that is, for any reference values x and y, this method returns true if and only if x and y refer to the same object (x==y has the value true).

See Also
hashCode, Hashtable