posted 13 years ago
In the code snippet above, how come X could be referred in the static block, even though it is only declared afterwards? I thought all static code is executed sequentially from top to bottom. How does the compiler know about X at //1 ?
Thanks.