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
How we can skip finally block of exception even if some exception occurs in the exception block in java?
Name few java util classes introduced with java 8 ?
Can we define constructor in inner class?
What is lambda expression in java?
Write a program to check string is palindrome without using loop?
Why static functions are used?
What is the original name of java?
What is the structure of java?
How do you delete a list in java?
Explain the difference between transient and volatile in java?
What is return keyword in java?
What is string english?
What does snprintf return?
Why are the destructors for base class and derived class called in reverse order when the program exits
Which methods cannot be overridden in java?