This week's book giveaway is in the OCAJP 8 forum. We're giving away four copies of OCA Java SE 8 Programmer I Study Guide and have Edward Finegan & Robert Liguori on-line! See this thread for details.
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 ?