I’m following the Java tutorials at tutorialspoint.com/java and the author mentions the “final” keyword at some point in the text. This either wasn’t explained or I glossed over it, and I wondered, “what’s the difference between a ‘final’ variable and a ‘const’ (constant) variable in Java?”
After some Googling, I found the answer: “const” doesn’t do anything in Java. It’s a reserved keyword, but it serves no purpose. There was talk of adding it in later versions, but, apparently, making it backwards-compatible is impossible. Interestingly, C++ has also added (as of C++11) the “final” keyword, which acts the same as it does in Java.