Prashnikaप्रश्निका
Code
About
‹ Back to the paper

Question 49

2 marks

Computer ScienceISC Computer Science - Competency Focused Practice Questions (CISCE, August 2024)Short answerProgramming in Java (Review of Class XI Sections B and C)

Answer the following question.

Why is the lang package termed as the default package in Java?

Answer

Answer

The java.lang package is called the default package because it is imported automatically into every Java program by the compiler; unlike other packages, it does not need an explicit import statement to use the classes it provides (such as String, Math, Integer and the other wrapper classes).