aspose file tools*
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
JavaRanch » Java Forums » Java » Applets
Bookmark "Help with Object class" Watch "Help with Object class" New topic
Author

Help with Object class

Arun kumar Maalik
Greenhorn

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
Marshal

Joined: Jul 08, 2003
Posts: 24187
    
  34

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: http://aspose.com/file-tools
 
subject: Help with Object class