This week's giveaway is in the Android forum.
We're giving away four copies of Android Security Essentials Live Lessons and have Godfrey Nolan on-line!
See this thread for details.
The moose likes Beginning Java and the fly likes Why java.lang.Object Class not abstract? Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Android Security Essentials Live Lessons this week in the Android forum!
JavaRanch » Java Forums » Java » Beginning Java
Bookmark "Why java.lang.Object Class not abstract?" Watch "Why java.lang.Object Class not abstract?" New topic
Author

Why java.lang.Object Class not abstract?

sruthi adhuri
Greenhorn

Joined: Nov 19, 2005
Posts: 9
I'm a new bee to Java. My Q'n is Why java.lang.Object Class just a super class and not an abstract class? Is it because Object class implementation with all native methods?
David O'Meara
Rancher

Joined: Mar 06, 2001
Posts: 13459

There are cases where you want to create an instance of a basic class for uses such as tagging, locking, keying and the like. While you could just as easily write an empty class that extends Object and provides nothing else, it provides nothing more or less than the Object class itself.

While I kind of agree that it could be abstract, I'm not too worked up about it There may also be some trickery in the Language spec and constructors that requires a concrete root class.
sruthi adhuri
Greenhorn

Joined: Nov 19, 2005
Posts: 9
During my journey of learning java, I found some more key factors that are answering my dumb Q�n:
Every object is concrete class of Object class by default which should not be a abstract class or Sun might thought of defining life cycle methods of every object.
 
Consider Paul's rocket mass heater.
 
subject: Why java.lang.Object Class not abstract?
 
Similar Threads
Why java.lang.Object class is concrete class? Why not it is a abstract class?
HttpServlet class
Aren't Collection and AbstractMap peers? what's the common subclass?
EJBObject Interface
Question about Abstract classes...