wood burning stoves
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
JavaRanch » Java Forums » Java » Beginning Java
Bookmark "Why java.lang.Object Class not abstract?" Watch "Why java.lang.Object Class not abstract?" New topic

Why java.lang.Object Class not abstract?

sruthi adhuri

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

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

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.
I agree. Here's the link: http://aspose.com/file-tools
subject: Why java.lang.Object Class not abstract?
jQuery in Action, 3rd edition