Why Integer Class in Final in Java ?

Integer class is a wrapper for int. If it is not marked final, then any other class can extend it and modify the behavior of Integer operations. To avoid this Integer wrapper class is marked as final.



You May Interest

What is the Difference Between Fail-fast and Fail-safe Iterator i ...

Comparing HashSet and TreeSet Collections in Java

How Will You Implement ApplicationContext in Spring Framework ?

How Can We Reference an Unreferenced Object Again in Java ?

What is the Difference Between wait and sleep Methods in Java ?