previous | start | next

Instance Methods Inherited by all Classes

  1. public String toString()
  2. public boolean equals(Object other)
  3. public int hashCode()

The x.toString() method is used by System.out.println(x) for any class type variable x.

Test for equality for basic types use the == operator.

Test for equality for class types must use the 'equals' method, not the == operator.

Several Java builtin data structure classes make use of the hashCode method.



previous | start | next