what are the differences between final,finally,finalize
methods?
Answer Posted / vibhor bhatnagar
Final :
final is a Modifier
final variable is a constant.
final method cann't be overrid.
final class cann't be subclassed.
Finally :
The finally clause is used to provide the capability to
execute code no matter whether or not an exception is
thrown or caught.
Finalize:
The purpose of finalization is to give an unreachable
object the opportunity to perform any cleanup processing
before the object is garbage collected. OR An object’s
finalize() method may only be invoked once by the garbage
collector.
| Is This Answer Correct ? | 15 Yes | 13 No |
Post New Answer View All Answers
Write a program to print fibonacci series
What is the difference between logical data independence and physical data independence?
What is difference between float and double?
What is casting in java programming?
Outline the major features of java.
What is difference between c++ and java ?
Can a vector contain heterogenous objects?
What are facelets templates?
What is collection api?
Explain about oops concepts.
What is the difference between serializable and externalizable interfaces?
If an object reference is set to null, will the garbage collector immediately free the memory held by that object?
What is the different types of functions?
What is a flag value?
What is thread safe java?