This week's book giveaway is in the Mac OS forum.
We're giving away four copies of a choice of "Take Control of Upgrading to Yosemite" or "Take Control of Automating Your Mac" and have Joe Kissell on-line!
See this thread for details.
The moose likes Programmer Certification (SCJP/OCPJP) and the fly likes initialization sequence 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 "initialization sequence" Watch "initialization sequence" New topic
Author

initialization sequence

geeta rai
Ranch Hand

Joined: Sep 18, 2003
Posts: 48
Could someone pls enlighten on the sequence of initialization steps when we have initializer blocks(both static and instance), superclass and subclass constructors in consideration.
Thanks.
Ko Ko Naing
Ranch Hand

Joined: Jun 08, 2002
Posts: 3178
I hope the following link might help you, which I bookmarked long time ago, when I was on my way to SCJP 1.2....
http://www.artima.com/objectsandjava/webuscript/InitCleanup1.html


Co-author of SCMAD Exam Guide, Author of JMADPlus
SCJP1.2, CCNA, SCWCD1.4, SCBCD1.3, SCMAD1.0, SCJA1.0, SCJP6.0
Dirk Schreckmann
Sheriff

Joined: Dec 10, 2001
Posts: 7023
geeta,
When I'm curious about things of this nature, I like to write myself a quick example program to see just what happens.
Concerning your curiousity, the following example
Foo

MiniBar

Bar

produces the following output.


[How To Ask Good Questions] [JavaRanch FAQ Wiki] [JavaRanch Radio]
 
 
subject: initialization sequence