The Java Language Environment

CONTENTS | PREV | NEXT The Java Language Environment

9.1 Java Language Classes

The java.lang package contains the collection of base types (language types) that are always imported into any given compilation unit. This is where you'll find the declarations of Object (the root of the class hierarchy) and Class, plus threads, exceptions, wrappers for the primitive data types, and a variety of other fundamental classes.

This picture illustrates the classes in java.lang, excluding all the exception and error classes.

Note the Boolean, Character, and Number classes--these classes are "wrapper" classes for the primitive types. You use these classes in applications where the primitive types must be stored as objects. Note also the Throwable class--this is the root class for all exceptions and errors.

Copyright © 1997 Sun Microsystems, Inc. All Rights Reserved.
Left Curve
Java SDKs and Tools
Right Curve
Left Curve
Java Resources
Right Curve
JavaOne Banner
Java 8 banner (182)