This week's book giveaway is in the OCMJEA forum. We're giving away four copies of OCM Java EE 6 Enterprise Architect Exam Guide and have Paul Allen & Joseph Bambara on-line! See this thread for details.
A constant is a variable that is declared as final , therefore cannot be changed.I have read in some posts about the term "compile time constant", could someone explain what is meant by this term please?
an island in the sun <br />with a language of many tongue?
It means that since the value is known to be constant (and thus unchangeable) at compile time, the compiler is free to insert its value wherever it is referenced. This means that, whenever you change the value, you need to forcibly recompile all classes that reference it, because the compiler will not pick up on that. A runtime constant, on the other hand, has its value set during (or most likely at the beginning) of a program run, and it just so happens that it is never changed (although, not being final, it could). [ August 30, 2005: Message edited by: Ulf Dittmer ]