Hi Zeeshan,
When you run <code>javac someFile.java</code> the
Java compiler turns your code into a series of <code>bytecode</code> which are translated by Java into machine code instructions when the program is run.
When the compiler runs across a variable it has to create bytecode instructions that say
lookup up the value at memory address such and such. This may take 2 or 3 lines of bytecode.
When a variable is declared <code>final</code> you are telling the compiler
this variable's value will never change. The compiler can then use one instruction
use this value whenever it encounters the variable; it does not need create lookup instructions for that variable.
The end result is shorter or
optimized bytecode.
Hope that helps.
------------------
Jane Griscti
Sun Certified Java 2 Programmer
"When ideas fail, words come in very handy" -- Goethe