Should I use upper-case naming to declare java constant variables?
问题 My question: Should names of constant Java variables (within methods) be upper-case? I've always been under the impression that a) if a variable is never going to change, it should be declared final (to show/enforce that it won't change) b) it should be named in upper-case However, I've noticed in eclipse, when changing a variable (within a method) to be final/constant, and subsequently refactoring/renaming it to something like below: final int NODE_COUNT = 3; I get the following warning: