Manning's Countdown to 2014
. Use discount code crdotd14 all month for 50% off every deal.
A friendly place for programming greenhorns!
Big Moose Saloon
Register / Login
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
Static Initializer question
Order of initialization
All times are in JavaRanch time: GMT-6 in summer, GMT-7 in winter
| Powered by
Copyright © 1998-2013