File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
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 Spring in Action this week in the Spring 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: 24187

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]
It is sorta covered in the JavaRanch Style Guide.
subject: Help with Object class