A "final" variable can only be defined once, and when it is static it needs to be defined at the first reference to the Class. Which means that you won't be able to use a method to set the value of a static final variable. You could use a static block (which gets executed at class load time), but that's not quite the same thing. So, if it is going to be set by a method the variable can be static but it cannot be final, or it can be final (if the method is called by the constructor of the class), but it cannot be static.
masijade
Industrious Poster
4,253 posts since Feb 2006
Reputation Points: 1,471
Solved Threads: 494