DEV Community

Discussion on: Why it is not possible to extend a final class in Java?

Collapse
 
val_baca profile image
Valentin Baca

Because it's final.

Use composition instead of inheritance if you want to "extend" a final class.

See the Decorator Pattern