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 are the ways in which a thread can enter the waiting state?

515


What is a Transient Object?

641


What is final variable?

498


What’s the difference between callable and runnable?

549


Why does abstract class have constructor?

562






Is char * a string?

541


What is the difference between menuitem and checkboxmenu item?

786


What is difference between core java and java ee?

476


Explain about assignment statement?

598


What is methodological framework?

577


How to create com object in Java?

651


How arrays are stored in memory in java?

513


What is multiple inheritance? Is it supported by java?

530


What are the different ways to handle exceptions?

542


What flag up means?

606