Intermediate
Java
Q61 / 100
What is the difference between final, finally, and finalize?
Correct! Well done.
Incorrect.
The correct answer is B) final=keyword modifier; finally=exception block that always runs; finalize=method called before GC
B
Correct Answer
final=keyword modifier; finally=exception block that always runs; finalize=method called before GC
Explanation
final modifies classes/methods/variables. finally is a block that always runs after try-catch. finalize() is a deprecated method called by GC before object cleanup.
Progress
61/100