java.lang.Object

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?

The Methods of java.lang.Object

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.


Previous | Next | Top | Cafe au Lait

Copyright 1997, 2006 Elliotte Rusty Harold
elharo@metalab.unc.edu
Last Modified April 26, 2006