I'm sure "final" is necessary to be constant, though maybe not sufficient.
Sun's coding conventions say we should use UPPERCASE_WITH_UNDERSCORES for "ANSI constants", without bothering to define what this means.
I did a web search but no luck; any info would be appreciated. My guess, however, is that they mean final variables initialized with
compile-time constant expressions. This would include String literals and expressions, but nothing initialized with a method call or a non-constant variable. So
are constants, but
are not. When JDK 1.5 comes out, enum values might also qualify as constants.
Of course, others here may well disagree...
[ May 28, 2003: Message edited by: Jim Yingst ]