Why Object is a super class in java?
1 posts in topic
Flat View  Flat View
TOPIC ACTIONS:
 

Posted By:   Sriram_Sundararajan
Posted On:   Thursday, September 11, 2003 05:10 AM

hi all
i have got one basic doubt in java. why Object class is a super class in java. C++ is also a object oriented language but there there is no concept of making object as a super class, but in java why we are having that.

thanks
sri

Re: Why Object is a super class in java?

Posted By:   Stephen_McConnell  
Posted On:   Thursday, September 11, 2003 05:20 AM

It was the decision of the language designers. Everything in Java is an Object (except your primitive data types and that was a concession). There are certain basic behaviors of all objects that are encapsulated in the Object.


C++ also does not run in a VM (except under .NET). An Object is the basic unit that is loaded by the VM.


And another answer is just plain " 'cause".... ;)


Stephen McConnell

About | Sitemap | Contact