What is the difference between final, finally and finalize?

Q

What is the difference between final, finally and finalize?

✍: Guest

A

Short answer:
final - declares constant
finally - relates with exception handling
finalize - helps in garbage collection
If asked to give details, explain:
final field, final method, final class
try/finally, try/catch/finally
protected void finalize() in Object class

2012-09-03, 2198👍, 0💬