This week's book giveaway is in the OCAJP forum. We're giving away four copies of OCA Java SE 8 Programmer I Study Guide 1Z0-808 and have Jeanne Boyarsky & Scott Selikoff on-line! See this thread for details.
In java compile time constant is declared and initilized at a single line. Variable a in your code is not compile time constant because you are declaring Variable a at one line and then initilization it at next line hence it is not compile time constant. Check the above for compile time constant.