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 are the Uses of AOP Module in Spring Framework ?

What is the Difference Between Iterator and Enumeration in Java ?

What are the Disadvantages of Multithreading in Java ?

What are the Differences Between a HashSet and a HashMap in Java ...

What is the Difference Between Sleep and Wait Methods in Java ?