File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
A friendly place for programming greenhorns!
Big Moose Saloon
Register / Login
Win a copy of
OCA/OCP Java SE 7 Programmer I & II Study Guide
this week in the
order of execution in java
Joined: Oct 21, 2001
Oct 21, 2001 17:19:00
what is the order of execution in
static variables/blocks, contructor, instance variables/blocks.
static variables/blocks, instance variables/blocks,contructor.
Joined: Sep 23, 2001
Oct 21, 2001 17:36:00
When the class is loaded, the static variables/blocks are initialized first. Then when the class is instantiated, the instance variables/blocks are initialized and then the constructor is executed.
Michael J Bruesch<br /><i>I code, therefore I am.</i>
I agree. Here's the link:
subject: order of execution in java
Order of initialization
Static Initializer question
All times are in JavaRanch time: GMT-6 in summer, GMT-7 in winter
| Powered by
Copyright © 1998-2014