Basic HTML version of Foils prepared Sept 21 1998

Foil 16 The Overarching Object Class

From Java Tutorial 98- 4: Multi-Treading, Useful Java Classes, I/O and Networking NAVO Tutorial -- Sept 23 1998. by Geoffrey C. Fox, Nancy McCracken


1 Public class Object is the root of the class hierarchy. Every Java class has Object as its ultimate parent and so any object (object with a small "o" is any instance of a class) can use methods of Object.
2 Methods of Object include:
  • clone() creates a clone of the object
  • equals( Object ) compares two objects, returning a boolean result
  • getClass() returns a descriptor of type Class (a child of Object) defining the class of the object
  • toString() returns a String representation of the object. It is expected that each subclass will override this method
  • wait(...) in various forms causes threads to wait
  • finalize() executed when the object is deleted by system (i.e., garbage collected)

in Table To:


© Northeast Parallel Architectures Center, Syracuse University, npac@npac.syr.edu

If you have any comments about this server, send e-mail to webmaster@npac.syr.edu.

Page produced by wwwfoil on Sat Nov 28 1998