Chapter 10. java.lang and Subpackages

This chapter covers the java.lang package which defines the core classes and interfaces that are indispensable to the Java platform and the Java programming language. It also covers more specialized subpackages:

java.lang.annotation

Defines the Annotation interface that all annotation types extend, and also defines meta-annotation types and related enumerated types. Added in Java 5.0.

java.lang.instrument

Provides support for Java-based "agents” that can instrument a Java program by transforming class files as they are loaded. Added in Java 5.0.

java.lang.management

Defines “management bean” interfaces for remote monitoring and management of a running Java interpreter.

java.lang.ref

Defines "reference” classes that are used to refer to objects without preventing the garbage collector from reclaiming those objects.

java.lang.reflect

Allows Java programs to examine the members of arbitrary classes, invoking methods, and querying and setting the value of fields.

Get Java in a Nutshell, 5th 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.