Robotics C++ Physics II AP Physics B Electronics Java Astronomy Other Courses Summer Session  

The Object Class

   Java defines one special class called Object.

   It is an implicit superclass of all other classes

   All classes are subclasses of Object

   A reference variable of type Object can refer to an object of any other class.

   Object defines the following methods - the only ones you are responsible for are listed below

 

boolean equals (Object obj)        Returns a boolean indicating whether some other object is "equal to" this one

String toString ( )                         Returns a string representation of the object