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
Does java support Operator Overloading?
Explain naming conventions for packages?
Is constructor inherited?
What are "methods" and "fields"?
What is module with example?
Can a list be null in java?
Why enumeration is faster than iterator?
What is functional interface in java?
What is the difference between yielding and sleeping in java programming?
What is the purpose class.forname method?
If two threads have same priority which thread will be executed first ?
What is an empty list in java?
Differentiate jar and war files?
What is a null check?
What are pass by reference and pass by value?