aspose file tools*
The moose likes Beginning Java and the fly likes Object extends Object 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 » Beginning Java
Bookmark "Object extends Object" Watch "Object extends Object" New topic
Author

Object extends Object

mohan rajv
Ranch Hand

Joined: Jan 28, 2009
Posts: 30
In java all classes extends Object class implicitly..
Object also a class in java
then is that also extends Object??!!
I am confused with this.can anyone explain with this problem?
Ulf Dittmer
Marshal

Joined: Mar 22, 2005
Posts: 42276
    
  64
The javadocs of a class -java.lang.Object included- will tell you which class it extends, if any.


Ping & DNS - my free Android networking tools app
mohan rajv
Ranch Hand

Joined: Jan 28, 2009
Posts: 30
In that javadoc it extends nothing.
but my doubt is we are not specifying anywhere our class extends Object,implicitly it extends Object na?
like this Object class how works?
David Newton
Author
Rancher

Joined: Sep 29, 2008
Posts: 12617

From the Object JavaDocs:
Class Object is the root of the class hierarchy. Every class has Object as a superclass. All objects, including arrays, implement the methods of this class.
Joanne Neal
Rancher

Joined: Aug 05, 2005
Posts: 3646
    
  15
The Java Language Specification is always a good place to start when looking for answers to questions like these

Section 8.1.4
The extends clause must not appear in the definition of the class Object, because it is the primordial class and has no direct superclass.


Joanne
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Object extends Object