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 is Volatile Keyword in Java ?

What are the Lifecycle Methods of a JSP ?

What is the Advantage of Using Unicode Characters in Java ?

What is the Reason to Organize Classes and Interfaces in a Packag ...

What is an EnumSet in Java ?