Exploring java.lang

This chapter discusses classes and interfaces defined by java.lang. As you know, java.lang is automatically imported into all programs. It contains classes and interfaces that are fundamental to virtually all of Java programming. It is Java’s most widely used package. Beginning with JDK 9, all of java.lang is part of the java.base module.

java.lang includes the following classes:


java.lang defines the following interfaces:


Several of the classes contained in java.lang contain deprecated methods, many dating back ...

Get Java: The Complete Reference, Eleventh Edition, 11th Edition now with O’Reilly online learning.

O’Reilly members experience live online training, plus books, videos, and digital content from 200+ publishers.