The java.lang package is automatically imported in any Java Program. java.lang package need not be explicitly imported. The classes of java.lang package can be accessed directly.
The java.lang package includes classes, interfaces and enumerated types that are closely related to language and the run time system. Few prominent classes of java.lang package are: java.lang.Object, java.lang.Class, java.lang.String, java.lang.StringBuffer, java.lang.StringBuilder, java.lang.Math, java.lang.Error, java.lang.Exception and java.lang.RuntimeException.
Note that java.lang is the one and only package that is automatically imported in any java program.
Related Questions Answers Articles
- What is a Java Package?
- What activities can be performed on Java File?
- Which Java Class will create and manipulate files?
- Name the Java Input Stream class
- What are the activities performed on java input stream?
- How do you fill color inside Java Graphics Rectangle?
- How do you draw rectangle in Java Graphics?
- How do you draw a line in Java Graphics?
- Which java method is used to display graphics?
- Name java package containing graphics programming functions