What is the difference between constant variables and final variables in java?
问题 Please help me understand the difference between constant variables and final variables in Java. I am a bit confused with it. 回答1: Constant is the concept, the property of the variable. final is the java keyword to declare a constant variable. As other people pointed out, from a semantic/linguistic point of view the expression constant variable is an oxymoron and, as such, we could argue about its correctness. Quoting the specification, anyway, we can read A variable of primitive type [...],