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 6
Follow 4
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 9
Follow 5
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 6
Follow 3
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 8
Follow 5
Answer submitted successfully. ×

Please enter your answer

IT Courses/Java

Which is the best programming language to learn in today's era? Java, C,C++, Python or any else?

Asked by Swati Bulkquestions 11 Jul

Answer 5
Follow 3
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

Session Tracking In Java Servlets

Session Tracking: HTTP is a stateless protocol. Each request is independent of the previous one. However, in some applications, it is necessary to save state information so that information can be collected from several interactions between a browser...

Core Java

Introduction: An Object Oriented Programming Language consists of Objects. There are object oriented programming languages like Smalltalk, C++. Each and every OOP language has some underlying disadvantages. C++ has some disadvantages like Security, Robust...

What Is The Exact Life Cycle Of A Servlet?

Java : Command Line Arguments

The parameters which are provided to the program at the command line. Eg:d:\>java a 10 20 30 Here,“java” is an interpreter, “a” is filename,10,20,30 are arguments passed to the program while executing the program And the notation...

Why Should We Learn Java Language?

Most of starters has confusion today that which of the programming language should be chosen to work on. It totally depends upon your need. As per my opinion, if you want to grow your career in IT industry it is good to choose Java Language because of...

Sponsored

Find Best Java Training Classes?

Find Now »