Signup as a Tutor

As a tutor you can connect with more than a million students and grow your network.

IT Courses/Java

Do I need to import java.lang package any time? Why?

Asked by Last Modified  

Answer
Follow 0

Please enter your answer

19 Answers   1 Likes | 0 Dislikes

Experienced Java Professional

No, you don't need to import it at any time. As this is part of java.lang package is a part of \jdk1.6.0_11{this is the location f your jdk installation directory}\jre\lib\rt.jar and this rt.jar (called runtime jar) is needed to run your java class. So without this rt.jar, event you can not write your java program.And as this is by default is in the run time , so you don't need to import it.

Comments
Dislike Bookmark

Hadoop Certified developer with java experience

not required, its available by default

Comments
Dislike Bookmark

Expert in Java J2EE Training

Nope.

Comments
Dislike Bookmark

Join Urbanpro.com, India’s most trusted education portal for your learning requirements

POST YOUR REQUIREMENT NOW

If you import that package in your program.. compiler won't give you any error. But if the by default package is being imported in any java program .. so you don't need to explicitly import it

Comments
Dislike Bookmark

Java Trainer

No, you don't need to. its available by default.

Comments
Dislike Bookmark

Senior Software Engineer

No. It is by default loaded internally by the JVM.

Comments
Dislike Bookmark

Data Modeling, MSBI, Sql Server and ETL testing Trainer

No. It is by default loaded internally by the JVM

Comments
Dislike Bookmark

No, no need of import java.lang package as this package is loaded internally by the JVM (Java Virtual Machine).

Comments
Dislike Bookmark

A software veteran with more than decade of experience

No..java.lang always gets imported automatically when you create a new class

Comments
Dislike Bookmark

Software Development Trainer

No we do not as it's loaded by default.

Comments
Dislike Bookmark
Related Questions

IT Courses/Java

Why we are using this keyword in Java?

Asked by Kiran Bulkquestions 11/07/2017

Answer 7
Follow 5
Answer submitted successfully. ×

Please enter your answer

IT Courses/Java

What is the purpose of using throws keyword in java?

Asked by Saritha Bulkquestions 11/07/2017

Answer 10
Follow 8
Answer submitted successfully. ×

Please enter your answer

IT Courses/Java

Is synchronized keyword necessary, in Java, if everything that is modified in a function is local to that function?

Asked by Abishiek Bulkquestions 11/07/2017

Answer 5
Follow 1
Answer submitted successfully. ×

Please enter your answer

IT Courses/Java

What programming languages should a freshman learn if he already knows C, C++, Java and Python?

Asked by Sushmita Bulkquestions 11/07/2017

Answer 7
Follow 5
Answer submitted successfully. ×

Please enter your answer

IT Courses/Java

What is the use of the "this" keyword in Java?

Asked by Deepak Bulkquestions 11/07/2017

Answer 9
Follow 6
Answer submitted successfully. ×

Please enter your answer

Looking for a Tutor?

Find best Tutors in your locality on UrbanPro.

FIND NOW

Now ask questions in any of the 1500+ Categories, and Get Answers from Tutors on UrbanPro.com

ASK A QUESTION

Related Lessons

Method Overloading vs Method Overriding

1. Method Overloading: Method overloading means a same method with same name can have different implementations/body by changing one of the follwing thing: 1) Number of Parameters 2) Order of Parameters 3) Type of Parameter i. Method overloading can be...

Difference Between Checked And Un-Checked Exception

1. Exception is an abnormal condition in the program, if raises program terminates abnormally. 2. Exception always occurs at runtime only, there is no chance of exception at compile time. 3. Syntactical mistakes or errors are occurs at compile time. 4....

Final, Finally And Finalize In Java

Final: 1. It is a non access modifier that can be applied to variables,methods and to class. 2. Final means non-changable. Final variable: 1. If a variable is declared as final it can't be re-assigned. 2. If there is any final variable in class simply...

Implementation: What Is JPA And JPA?

The basic Java framework to access the database is JDBC. Unfortunately, with JDBC, a lot of hand work is needed to convert a database query result into Java classes. JPA allows us to work with Java classes as it provides a transparent layer to each database...

Why We Should Go With Java?

Java is widely used in the Desktop application, web application, mobile development, games etc. Java is an object-oriented programming language. Its follow all the oops concept Like Object, Class, polymorphism, Inheritance, Encapsulation, Abstraction...

Sponsored

Find Best Java Training Classes?

Find Now »