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 Rules of Method Overloading and Method Overriding in ...

How Can Be Read Data From a Form in a JSP ?

What is a Singleton Class in Java ?

What is a Compile Time Constant in Java ?

What are the Main Uses of Singleton Design Pattern in Java ?