Static initialization blocks run once, when the class is first loaded.
Instance initialization blocks run every time a new instance is created. They run after all super-constructors and before the constructor's code has run.
If multiple init blocks exist in a class, they follow the rules stated above, AND they run in the order in which they appear in the source file
Initialization Blocks
Friday, August 21, 2009
Subscribe to:
Post Comments (Atom)
0 comments:
Post a Comment