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

How Will You Sort Objects by Natural Order in a Java List ?

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

How Will You Pass Information From One JSP to Another JSP ?

How Will You Delete a Cookie in JSP ?

How Will You Use a Cookie in JSP ?