This week's book giveaway is in the Jobs Discussion forum.
We're giving away four copies of Java Interview Guide and have Anthony DePalma on-line!
See this thread for details.
The moose likes Applets and the fly likes Help with Object class Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of Java Interview Guide this week in the Jobs Discussion forum!
JavaRanch » Java Forums » Java » Applets
Bookmark "Help with Object class" Watch "Help with Object class" New topic

Help with Object class

Arun kumar Maalik

Joined: Jul 04, 2006
Posts: 18
Dear sir
would U tell me that why all(almost all) classes in java are derived from Object classes. Pls sugets me.

With regard
Arun kumar maalik
Ernest Friedman-Hill
author and iconoclast

Joined: Jul 08, 2003
Posts: 24199

All classes, except for Object, extend exactly one other class. If you are defining a new class and you don't explicitly specify a parent class, then its parent is Object, by default.

Why? That's just how it works. Java has a "single-rooted" object inheritance tree, like Smalltalk or the old NIH class library for C++.

[Jess in Action][AskingGoodQuestions]
I agree. Here's the link:
subject: Help with Object class
It's not a secret anymore!