HELP! * GREY=local LOCAL HTML version of Foils prepared 29 January 1996

Foil 68 The Overarching Object Class

From CPS616 Lectures on Java CPS616 Basic Information Track for Computational Science -- Winter-Spring Semester 96. by Geoffrey C. Fox * See also color IMAGE

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 any class) can use methods of Object
Methods of Object (used as object.Method()) include:
clone() Creates a clone of the object
equals(another object) compares two objects returning boolean answer
getClass() returns a descriptor of type Class (a child of Object) defining class of object
toString() returns a String which represents "value" of object. It is expected that each subclass will override this method
wait() in various forms is used to cause threads to wait
finalize() contains code to perform when object is deleted by system (I.e. garbage collected)



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 Tue Feb 18 1997