Order of the execution members

hi, friends

take the following

publicclass MyC{

publicstaticvoid main(String[] args){

MyC obj=new MyC(l);

}

staticint i=5;

staticint l;

int j=7;

int k;

public MyC(int m){

System.out.println(i+" "+j+" "+k+" "+l+" "+m);

}

{j=70; l=20;}

static{i=50;}

}

the output is50 700 20 0

my question is about m parameter, why was it zero?

I expected that it would be 20, because I think the order of the execution of those members is:

1- static members (variables and blocks)

2- instance members (variables and blocks)

3- constructors, no matter whether default or non-default

is that correct?

[1582 byte] By [Shawqi_Abbada] at [2007-10-2 5:50:04]
# 1
You pass m as 0 (L from static context -- btw, never ever name a variable "l". It took me a while to find out it's not a 1) into the non-default ctor as argument m. So m is and will remain 0.
CeciNEstPasUnProgrammeura at 2007-7-16 1:59:28 > top of Java-index,Java Essentials,Java Programming...
# 2
thunx brotherthat's mean that my order for the executed members is correct, isn't it?
Shawqi_Abbada at 2007-7-16 1:59:28 > top of Java-index,Java Essentials,Java Programming...