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 variable is considered a 'constant variable' only if it is declared: (a) with the 'final' modifier (b) with an initializer that's a compile-time constant expression
where a 'compile-time constant expression' is basically an expression that's made up of only literals and other constant expressions or constant variables. (See the Java Language Spec for a more formal definition.)
[ November 10, 2007: Message edited by: Kelvin Lim ]
Joined: Oct 23, 2007
@Freddy Wong : Thanks for the link. @Kelvin Lim: Thanks for the example. I got it now.