Why java.lang Package is the Default package?

Showing Answers 1 - 8 of 8 Answers

srini

  • Oct 28th, 2005
 

in java.lang package Object class is there which is the super super class of all class in java language so in order to import that jdk soft implicitly provides Default package

  Was this answer useful?  Yes

srinivas

  • May 17th, 2006
 

hi,

In java Object class is super class of all classes and userdefined classes.So in order to run a simple java programme Object class is required.and the object class is available in java.lang package only. so java soft designed as java.lang package as default package.

ok baye...................

keeps smiling and mailing

bora_srinivasarao@yahoo.co.in

if any want java material & doubts regarding j2se ,j2ee plz send mail to

bora_srinivasarao@yahoo.co.in

Note:if possible i will clarify doubts.but i send java material.

  Was this answer useful?  Yes

anonymous

  • Mar 2nd, 2017
 

Because all those basic classes like Object, String, Wrapper Classes, which are essential to build either a simple or complex program are available in java.lang package. Hence this package is made default.

  Was this answer useful?  Yes

vinay

  • Apr 4th, 2018
 

Then why it is given as java.lang.* instead of java.lang.object

  Was this answer useful?  Yes

Give your answer:

If you think the above answer is not correct, Please select a reason and add your answer below.

 

Related Answered Questions

 

Related Open Questions