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 Examples of Observer Design Pattern in JDK ?

What is the Use of a Dictionary Class in Java ?

What is Difference Between Include Directive and Include Action o ...

What is the Difference Between StringBuffer and StringBuilder in ...

How Stack and Heap Work in Java Multi-threading Environment ?