The java.lang package is always imported by default.
In Java, the java.lang
package is always imported by default. This means that you don’t need to explicitly import classes from this package in your Java code; they are automatically available for use. Classes such as String
, Object
, and System
are part of the java.lang
package, and you can use them without importing the package explicitly.