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
What is a java lambda expression?
What is the need of transient variables in Java ?
What are the advantages and disadvantages of reference counting in garbage collection?
What do you mean by stack?
Differentiate between postfix and prefix operators in java.
Discuss 2D arrays.
What are aggregate functions explain with examples?
What is the difference between math floor and math round?
Explain restrictions for using anonymous inner classes?
What is a java predicate?
What is finally in Java?
What is charat java?
I want to re-reach and use an object once it has been garbage collected. Define how it’s possible?
Can an arraylist be empty?
How does sublist works in java?