O'Reilly logo

Just Java™ 2 by Peter van der Linden

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

java.lang.Object

We'll finish this chapter by describing a couple of much-used classes that we have seen informally already: Object and String.

The class java.lang.Object is the ultimate parent of every other class in the system, and it has half-a-dozen methods which therefore can be invoked on any and all objects. (An object is able to invoke the methods in all its parent classes — remember how ClockView objects could call setVisible() because they got it from their parent JFrame). Following are some of the members Object has. You can skim through this now, jumping ahead to the description of type String, and return if you need more information about something specific in Object.

public class Object {     public java.lang.Object();  // constructor ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required