• Post Reply Bookmark Topic Watch Topic
  • New Topic

Obect Class Loaded  RSS feed

 
Jyoti Aggarwal
Ranch Hand
Posts: 33
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,

It might be a very stupid question. I would like to know how is Object class loaded.
I mean how every classes extends Object class without explicitly defining the same?
 
Seetharaman Venkatasamy
Ranch Hand
Posts: 5575
Eclipse IDE Java Windows XP
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Jyoti Aggarwal wrote:
I mean how every classes extends Object class without explicitly defining the same?


It is like compiler provides default constructor implicitly, if you dont specify constructor explicitly.



I do suggest you to compile the above class and test *javap -c A* in command prompt
 
Bharath Raja
Ranch Hand
Posts: 111
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
this topic already discussed see this page.
 
It is sorta covered in the JavaRanch Style Guide.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!