posted 14 years ago
A compile time constant is a final variable with a value at compile time (e.g. final int i=5;). A final variable is a variable that can only be assigned once. But that doesn't have to mean that is has a value at compile time (e.g. final int i; i=5);
The switch statement only accepts the first.
"Any fool can write code that a computer can understand. Good programmers write code that humans can understand." --- Martin Fowler
Please correct my English.