Final keyword in Java

Final class:

Meaning: A final class cannot be subclassed.
Advantage: Security or efficiency.
Example: java.util.System

Final method:

Meaning: The method cannot be overridden in a subclass.
Advantage: Preventing unexpected behavior crucial to the functionality of the class.

Final variable:

Meaning: The variable is immutable, meaning once assigned, it cannot be reassigned. This is different from constant keyword since constant should be known at compile time and final need not be.
Advantage: Optimization.