What are the uses of final, finally and finalize in java?
Answer Posted / ch.soundarya
final is a keyword which is used on variable,method as well as on class.the variable with final keyword cannot be re used.and the method with final cannot be overrriden.the class with final keyword cannont be inherited.
FINALIZE:is amethod used for garbage collection .we can force finalize method explicitly for garbage collection.
FINALLY: it is method is used for close the allocated resources in a running program of java class.
| Is This Answer Correct ? | 1 Yes | 0 No |
Post New Answer View All Answers
I have multiple constructors defined in a class. Is it possible to call a constructor from another constructor’s body?
Explain about fail safe iterators in java?
Is empty string in java?
How many bits are in a sentence?
Explain about the performance aspects of core java?
Which language is java?
What is difference overloading and overriding?
How do you replace all in word?
What is the char data type?
What are the types of collections in java?
Explain super keyword in java.
What do you know about the garbage collector?
Difference between overriding and overloading in java?
Who developed java?
Differentiate between == and equals().