Hi,
I tried out this piece of code:
[C]
class test1 extends Object{
static
{int j=1;
int i=j+1;
}
public static void main(
String args[]){
//System.out.println(i);
}
}
[/C]
It got compiled and executed perfectly..
According to you or rather JLS,
x = 100; // ok - assignment
// int y = x + 1; // error - read before declaration
It is not supposed to compile..
Somebody plz., clarify..
Thanks
Nijeesh.