Java: What does the Final Term before a Class Name Mean?

Date: 2014-03-05 |

DISCLOSURE: If you buy through affiliate links, I may earn a small commission. (disclosures)

Placing the final denomination before a class body means that the class can not be extended.  In other words, that is the last installment in that branch of the class tree.  No class can extend or be a subclass of it.

This Stack Overflow thread goes deeper into the fundamentals of what final means and why you would ever want to make a class final: http://stackoverflow.com/questions/5181578/use-of-final-class-in-java

Want more like this?

The best way to support my work is to like / comment / share for the algorithm and subscribe for future updates.