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

Senior Software Engineer

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

Comments
Dislike Bookmark

Computer language Expert

Its the basic package. It is included automatically. You need not to write it

Comments
Dislike Bookmark

5 Years of IT Experience in Top Software MNCs

No because the Java compiler automatically imports the "java.lang.*" package for you.

Comments
Dislike Bookmark

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

POST YOUR REQUIREMENT NOW

CodeGyan - A place to expertise in Coding

"Java.lang" package doesn't require to import all the times. Its the default package. But when it comes to other packages you should import.

Comments
Dislike Bookmark

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

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

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

Comments
Dislike Bookmark

Software Development Trainer

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

Comments
Dislike Bookmark

No, internally loaded by JVM...

Comments
Dislike Bookmark

Hadoop Certified developer with java experience

not required, its available by default

Comments
Dislike Bookmark
Related Questions

IT Courses/Java

Why we are using this keyword in Java?

Asked by Kiran Bulkquestions 11 Jul

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 Jul

Answer 10
Follow 7
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 Jul

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 Jul

Answer 7
Follow 4
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 Jul

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

Features Of Java

There is given many features of Java. They are also known as java buzzwords. The Java Features given below are simple and easy to understand. Simple. Object-Oriented. Portable. Platform independent. Secured. Robust. Architecture neutral. Dynamic. Interpreted. High...

JAVA Version History

Java Version History: There are many java versions that has been released. Current stable release of Java is Java SE 8. JDK Alpha and Beta (1995). JDK 1.0 (23rd Jan, 1996). JDK 1.1 (19th Feb, 1997). J2SE 1.2 (8th Dec, 1998). J2SE 1.3 (8th May, 2000). J2SE...

History Of Java

Java history is interesting to know. The history of java starts from Green Team. Java team members (also known as Green Team), initiated a revolutionary task to develop a language for digital devices such as set-top boxes, televisions etc. For the green...

10 Cool SQL Optimizations That Do Not Depend On The Cost Model

Today, we don’t want to talk about cost based optimisation, i.e. optimisations that depend on a database’s cost model. We’ll look into much simpler optimisations that can be implemented purely based on meta data (e.g. constraints) and...

jOOQ 3.10 Supports JPA Attribute Converter

One of the cooler hidden features in jOOQ is the JPADatabase, which allows for reverse engineering a pre-existing set of JPA-annotated entities to generate jOOQ code. For instance, you could write these entities here: @Entity public class Actor { ...

Sponsored

Find Best Java Training Classes?

Find Now »