I am using NetBeans IDE and before Java, I was a C++ programmer. From C++, what I learn is that constant variable names should contain only uppercase letters. I think most programming languages suggest that constant variables should only contain uppercase letters with underscores to separate words.
My IDE, NetBeans, only warns me about the convention when I try to declare a static
member variable with lowercase letters. It's okay if the variable is final
, but non-static.
final int mem1 = 90; // no warning
static final int mem2 = 90; // warning
Shouldn't the programmer be forced to use uppercase letters for naming any kind of (static, non-static) constant variables?