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 ...
Get Just Java™ 2 now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.