This week's book giveaway is in the Big Data forum.
We're giving away four copies of Elasticsearch in Action and have Radu Gheorghe & Matthew Lee Hinman on-line!
See this thread for details.
The moose likes Beginning Java and the fly likes question about Object Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Elasticsearch in Action this week in the Big Data forum!
JavaRanch » Java Forums » Java » Beginning Java
Bookmark "question about Object" Watch "question about Object" New topic
Author

question about Object

jone wars
Greenhorn

Joined: Jan 22, 2013
Posts: 3
i know every default no
argument constructors first
statement is super(); that is its
going to call its super class no
argument constructor. And every
class(i.e. which does not extends a
class) is child class of object. Then
my question is,what is super(); of
Object class doing???
Joanne Neal
Rancher

Joined: Aug 05, 2005
Posts: 3742
    
  16
See section 8.8.9 of the Java Language Specification.
The JLS is something you should always check when you have these sort of questions about how Java functions.


Joanne
Jesper de Jong
Java Cowboy
Saloon Keeper

Joined: Aug 16, 2005
Posts: 14601
    
  25

Welcome to the Ranch.

Since Object is at the root of the class hierarchy (class Object is the only one which doesn't have a superclass), there's no superclass constructor to call, so super(); would not do anything.


Java Beginners FAQ - JavaRanch SCJP FAQ - The Java Tutorial - Java SE 8 API documentation
jone wars
Greenhorn

Joined: Jan 22, 2013
Posts: 3
Thanks..
 
It is sorta covered in the JavaRanch Style Guide.
 
subject: question about Object