O'Reilly logo

Sun Certification Training Guide (310-025, 310-027): Java™ 2 Programmer and Developer Exams by Jamie Jaworski

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

The Object, Class, and Package Classes

Object and Class are two of the most important classes in the Java API. The Object class is at the top of the Java class hierarchy. All classes are subclasses of Object and, therefore, inherit its methods. The Class class is used to provide information about each class that is loaded by the Java Virtual Machine. The Package class was introduced with JDK 1.2. It is used to provide version information about a package.

Object

The Object class has no variables and has only one constructor; however, it provides 11 methods that are inherited by all Java classes and supports general operations used by all objects. For example, the equals() and hashCode() methods are used to compare Java objects. Hash tables are ...

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