Anyone who is familiar with Java (or other object-oriented) programming has more than likely heard of the SOLID development principles and knows that the O is for ‘Open / Closed Principle.’ In Java the use of the final keyword helps enforce the principle and a second programming ideal discussed in Bloch’s Effective Java book: composition over inheritance. These two principles most developers should be able to rattle off fairly quickly, however there is a third aspect that the final keyword assists with that not many developers think about.
That is, the final keyword provides is prevention of the finalizer attack. In short, the finalizer attack is a technique to take over a class through the use of the class’ finalizer method. Using the final keyword on your class (or the finalize method) prevents classes from injecting malicious code or short-circuiting security routines.
As a note, if you’d like to see more about various secure coding techniques you can read through them here.