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
What are the different http methods?
What is the indent key?
What is the use of coding?
What is qualitative variable?
Can java hashmap have duplicate keys?
when should you use stringbuilder class in a program?
Why we used break and continue statement in java?
What is jit compiler ?
How can we make string upper case or lower case?
What is Java Shutdown Hook?
What is the byte order of byte buffer?
What is the difference between preemptive scheduling and time slicing?
What is compareto?
Is sizeof a keyword in java programming?
What do you mean by aggregation?