JavaBeginner#keywords

What is the final keyword?

final variable: cannot be reassigned. final method: cannot be overridden. final class: cannot be subclassed (e.g., String). It enforces immutability and design intent.

Example
final int MAX = 100;
MAX = 200; // compile error
final class Utility {} // cannot be extended

Related Questions

1
JavaIntermediate#memory#jvm

Explain Java memory model: heap vs stack.

Open
2
JavaIntermediate#gc#memory

What is garbage collection?

Open
3
JavaIntermediate#exceptions

What are checked vs unchecked exceptions?

Open