Is there any need to import java.lang package?
Answers were Sorted based on User's Feedback
Answer / harsha
It is not need, by default it is loaded internally by the
JVM.
| Is This Answer Correct ? | 31 Yes | 4 No |
Answer / srikanth
no, not needed it is included by default by JVM
| Is This Answer Correct ? | 18 Yes | 2 No |
Answer / srikanth
no, not needed it is included by default by JVM
| Is This Answer Correct ? | 12 Yes | 2 No |
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 |
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 |
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 |
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 |
Answer / guest
java.lang package is imported by default.we donot really
need to import it.
| Is This Answer Correct ? | 0 Yes | 0 No |
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 |
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 |
What will happen if there is a default method conflict as mentioned above and we have specified the same signature method in the base class instead of overriding in the existing class ?
What is a super method?
What is constructor and virtual function? Can we call a virtual function in a constructor?
Explain about collection interface in java?
What are static variables and functions?
When should a function throw an exception?
0 Answers Thomson Reuters, Virtusa,
What is the best definition for data?
What are the types of methodology?
what is the need to set path in java? how many ways to set path in java? Explain breif?
What is the use of set in java?
what is jms? features of jms
What is the purpose of skeleton and stub?