what are the differences between final,finally,finalize
methods?

Answer Posted / ravikiran

final variable:Acts like a constant
final method:cann't be overrided
final class:cann't get subclassed

finally is a block which is used to conserve the resource
irrespective of the exception being caught or not

finalize is the method which is used to save tje resources
before the unused object get garbage collected.

Is This Answer Correct ?    55 Yes 6 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What is the difference between reader/writer and inputstream/output stream?

551


Explain the hierarchy of java exception classes?

594


What is math exp in java?

544


What are basic keywords?

555


Why javac is not recognized?

517






What are the 5 types of research methods?

585


What is the difference between char and char *?

563


What is a double vs float?

534


Can we overload run() method in java?

593


Can a boolean be null java?

539


Objects or references which of them gets garbage collected?

531


Can final class have constructor?

497


What is the difference between menuitem and checkboxmenu item?

771


Can an interface implement another interface?

570


What are the three best choices for a development environment?

599