Hi,
When a class is loaded, static blocks get executed first. static methods don't get executed.
Consider a case where you have static variable and staic blocks as well, what happens when a class is laoded-
static variables - gets initialised first.
Next Static blocks get executed, in the sequence they appear.
Ex -
class test{
static { // gets executed second
i = 10;
}
static int i=0; // gets executed first
static {....} // gets executed third
Burn this in your mind, if you are plannig for
SCJP, 'coz they would sure trick you on this.
}