hi tony,
the two examples that u have given are not equal or same i put a program to demonstrate this. i is a local variable in the constructor and thus does not refer to the static variable i. while j prints out 4 correctly.
public class Test
{ static int i,j;
Test(int i, int j) {
i = i; this.j = j;
}
public static void main(
String args[]){
Test e=new Test(4,4);
System.out.println(i);
System.out.println(j);
}
}
// i prints out 0 not 4;
monica,
since the two examples print out different results. the importance of this is clarified.
Rahul
[This message has been edited by rahul_mkar (edited June 11, 2000).]