Is there any need to import java.lang package?

Answers were Sorted based on User's Feedback



Is there any need to import java.lang package?..

Answer / harsha

It is not need, by default it is loaded internally by the
JVM.

Is This Answer Correct ?    31 Yes 4 No

Is there any need to import java.lang package?..

Answer / srikanth

no, not needed it is included by default by JVM

Is This Answer Correct ?    18 Yes 2 No

Is there any need to import java.lang package?..

Answer / srikanth

no, not needed it is included by default by JVM

Is This Answer Correct ?    12 Yes 2 No

Is there any need to import java.lang package?..

Answer / thomman yacob

The above example , imported package is not java.lang package.
Thats is another package java.lang.reflect.*;
Both packages are different. Do not get confused.

The below classes are available with Java.Lang.*;

Boolean,Enum,System,Object,Class,ClassLoader,Float ..ect.

Is This Answer Correct ?    9 Yes 2 No

Is there any need to import java.lang package?..

Answer / arunji,shc

no,because java.lang.package is a default package.so no
need to import this package in our progrm

Is This Answer Correct ?    7 Yes 2 No

Is there any need to import java.lang package?..

Answer / subha narayan mohapatra

No, we need not to import java.lang package because
java.lang package is the default package for all java files
and it will add automatically in our java file.

Is This Answer Correct ?    5 Yes 0 No

Is there any need to import java.lang package?..

Answer / ashish

java.lang package is automatically loaded by JVM so no need
to define it by own.

Is This Answer Correct ?    4 Yes 2 No

Is there any need to import java.lang package?..

Answer / guest

java.lang package is imported by default.we donot really
need to import it.

Is This Answer Correct ?    0 Yes 0 No

Is there any need to import java.lang package?..

Answer / prashant

In java, by default the java.lang package is imported and
the java.lang.package package is in the java.lang package,so
for that no need to that.

Is This Answer Correct ?    0 Yes 0 No

Is there any need to import java.lang package?..

Answer / navneet raushan

Yes, When u will use reflection package then u will have to
import java.lang package.

Is This Answer Correct ?    5 Yes 6 No

Post New Answer

More Core Java Interview Questions

can we create instance for interface in java?

4 Answers  


What will be the output of the program? public class Test { public static void main(String args[]) { ArrayList<String> list = new ArrayList<String>(); list.add("2"); list.add("3"); list.add("4"); list.add("5"); System.out.println("size :"+list.size()); for(int i=0;i<list.size();i++) { list.remove(i); } System.out.println("size after:"+list.size()); } }

5 Answers   Rolta,


what do you mean by marker interface in java?

0 Answers  


Is java pure object oriented or not? if yes, give the valid reason.

13 Answers   Emphasis, NIIT, Syntel, Wipro,


If set accepts only one argument then how can it compare two objects to avoid duplicates

5 Answers  






Does sprintf allocate memory?

0 Answers  


When we serialize an object does the serialization mechanism saves its references too?

0 Answers  


how to handle exceptions in ejb?

0 Answers   Satyam,


What is floor in java?

0 Answers  


Write a program to find the greatest of three numbers in java?

0 Answers  


What is the difference between java and .Net?

39 Answers   Bosch,


Does java support multiple inheritance or not?

0 Answers   Hexaware,


Categories