Difference between final, finally, and finalize.

Junior Java

Answer

final: Makes variables constant, classes non-inheritable, methods non-overridable.
finally: Executes after try/catch always.
finalize: Called before garbage collection (deprecated).

Want to bookmark, take notes, or join discussions?

Sign in to access all features and personalize your learning experience.

Sign In Create Account

Source: SugharaIQ

Ready to level up? Start Practice