Quick Answer
final keyword: makes variable constant, method un-overridable, class un-extendable. finally block: always executes after try-catch, used to release resources (even if exception is thrown - except System.exit()). finalize() method: called by GC before reclaiming object memory - deprecated, unpredictable timing, don't use for cleanup. Use try-with-resources instead of finalize for resource cleanup.
Answer
final: Makes variables constant, classes non-inheritable, methods non-overridable. finally: Executes after try/catch always. finalize: Called before garbage collection (deprecated).
S
SugharaIQ Editorial Team
Verified Answer
This answer has been peer-reviewed by industry experts holding senior engineering roles to ensure technical accuracy and relevance for modern interview standards.