Which one is not a final class in java? Byte or String or StringBuilder or Character?
All wrapper classes of java are immutable classes, that is final classes. Where as StringBuilder is not a final class.
All wrapper classes are final classes, so that no body will extend those classes and change their behavior.
Eg: Integer should behave like an integer only. If that class is not final, then any one can extend Integer into his own class and change the basic behavior of integer class. To avoid this, java made all wrapper classes as final classes.
Back To Top