Explain final, finalize() and finally?
Answer Posted / radhika
Final keyword can be used for class, method and variables.
Afinal method can't be overriden.
Finalize() is used just before an object is destroyed or
garbage collected.
Finally keyword used in Exception handling, creates a block
of code that will be exceuted after a try and catch block.
| Is This Answer Correct ? | 1 Yes | 1 No |
Post New Answer View All Answers
Can we convert list to set in java?
How can you handle java exceptions?
How do you identify if jvm is 32-bit or 64-bit from java program?
Why is inheritance used in java?
What is the difference between Java and C++?
If a variable is declared as private, where may the variable be accessed?
What is data object example?
What does three dots mean in java?
What is functional interface in java example?
Is java 11 paid version?
What is meant by singleton class?
Which collection is sorted in java?
What is lambda expression in java?
What are voids?
What is composition in java?