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
Explain java code for recursive solution's base case?
Explain wait() method of object class ?
Explain the JDB in depth & command line.
What is a conditional equation?
What is file in java?
what is object-oriented programming in java?
Can a class be private?
What are the four integer types supported by java?
What is a java string?
Explain the importance of finally block in java?
What is an arraylist in java?
What is outofmemoryerror in java?
What is the difference between abstract classes and interfaces?
How do you compare objects in java?
What is methodological theory?