9.6 Class Object

As we discussed earlier in this chapter, all classes in Java inherit directly or indirectly from class Object (package java.lang), so its 11 methods (some are overloaded) are inherited by all other classes. Figure 9.12 summarizes Object’s methods. We discuss several Object methods throughout this book (as indicated in Fig. 9.12).

Image
Image

Fig. 9.12 | Object methods.

Get Java™ How To Program (Early Objects), Tenth Edition 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.