File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
Win a copy of Clojure in Action this week in the Clojure forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

initialization sequence

 
geeta rai
Ranch Hand
Posts: 48
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 3178
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
 
Dirk Schreckmann
Sheriff
Posts: 7023
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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.
 
It is sorta covered in the JavaRanch Style Guide.
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic