why you dont need to import javalangthere is one


Why You don't need to import java.lang.*

There is one exception to the import rule. All classes in the java.lang package are imported by default. Therefore you do not required to import java.lang.*; to use them without fully qualified names.

Now lets consider the System.out.println() method we've been using since the first day of class.

System is actually the java.lang.System class. This class has a public static field called out that is an instance of the java.io.PrintStream class. So while you write System.out.println(), you're really calling the println() method of the out field of the java.lang.System class.

Request for Solution File

Ask an Expert for Answer!!
JAVA Programming: why you dont need to import javalangthere is one
Reference No:- TGS0284776

Expected delivery within 24 Hours