Back to Developer Roadmap

Final Keyword

src/data/roadmaps/java/content/final-keyword@Ajuc_rHObqMQBXLqRIuxh.md

4.0700 B
Original Source

Final Keyword

The final keyword in Java is a non-access modifier used to apply restrictions on a variable, method, or class. When applied to a variable, it makes the variable's value constant after initialization. When applied to a method, it prevents the method from being overridden in a subclass. When applied to a class, it prevents the class from being subclassed (inherited).

Visit the following resources to learn more: