What is the difference between final, finally and finalize?

Questions by praveen.m   answers by praveen.m

Showing Answers 1 - 1 of 1 Answers

final is a keyword used to declare constants.
finally block is used in an exception handling.whether there is an exception or not in try block in , finally block will be executed.we used to provide the code like like deallocating resources(closing database,closing file.....).
finalize method will be called by garbage collector to remove the object from memory if it no longer has been used.we can call it explicitely ,but we are not sure that it will remove an object.

  Was this answer useful?  Yes

Give your answer:

If you think the above answer is not correct, Please select a reason and add your answer below.

 

Related Answered Questions

 

Related Open Questions