If the class is marked final
, it means that the class' structure can't be modified by anything external. Where this is the most visible is when you're doing traditional polymorphic inheritance, basically class B extends A
just won't work. It's basically a way to protect some parts of your code (to extent).
To clarify, marking class final
doesn't mark its fields as final
and as such doesn't protect the object properties but the actual class structure instead.