Why is there no Constant feature in Java?
I was trying to identify the reason behind constants in Java I have learned that Java allows us to declare constants by using final keyword. My question is why didn't Java introduce a Constant ( const ) feature. Since many people say it has come from C++, in C++ we have const keyword. Please share your thoughts. Every time I go from heavy C++ coding to Java, it takes me a little while to adapt to the lack of const-correctness in Java. This usage of const in C++ is much different than just declaring constant variables, if you didn't know. Essentially, it ensures that an object is immutable when