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
How to display all the prime numbers between 1 and 100
How many JVMs can run on a single machine and what is the meaning of Just-In-Time (JIT) compiler?
Write a function to find out longest palindrome in a given string?
What are assembly attributes?
What are facelets templates?
What is the difference between throw and throws keywords?
What is a function argument in java?
Can we declare the main method of our class as private?
What is literal example?
What are use cases?
How does thread synchronization occurs inside a monitor? What levels of synchronization can you apply?
What is use of arraylist in java?
How do you declare a destructor in java?
Define how destructors are defined in java?
What is parameter example?