aspose file tools*
The moose likes Programmer Certification (SCJP/OCPJP) and the fly likes Confused about this output-Constructor doubt Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Certification » Programmer Certification (SCJP/OCPJP)
Bookmark "Confused about this output-Constructor doubt" Watch "Confused about this output-Constructor doubt" New topic
Author

Confused about this output-Constructor doubt

Amit Batra
Ranch Hand

Joined: Mar 04, 2006
Posts: 361

how come after the implicit call to super() in X's constructor it busts out of the constructor to create Y() first before finishing up its own work?
bing marquez
Greenhorn

Joined: Aug 06, 2006
Posts: 11
check this out.
wise owen
Ranch Hand

Joined: Feb 02, 2006
Posts: 2023
Initialization:

In Java , when an object is created, initialization is done in this order:
  • Set fields to default initial values (0, false, null)
  • Call the constructor for the object (but don't execute the body of the constructor yet)
  • Invoke the constructor of the superclass
  • Initialize fields using initializers and initialization blocks
  • Execute the body of the constructor

  • Amit Batra
    Ranch Hand

    Joined: Mar 04, 2006
    Posts: 361
    Thanks guys.
     
    wood burning stoves
     
    subject: Confused about this output-Constructor doubt