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 Main Uses of Singleton Design Pattern in Java ?

How Strategy Design Pattern is Different From State Design Patter ...

How Will You Use Other Java Files of Your Application in JSP Code ...

What are the Java Collection Classes That Implement List Interfac ...

What are the Similarities Between HashSet and HashMap in Java ?