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
What programs use java?
Which collection allows duplicate values in java?
When do we use synchronized methods in java?
What is a static method in java?
What is called module?
What is composition in java?
Tell us something about different types of casting?
Can we overload destructor in java?
How is java created?
What are the methods to rectify ambiguities in the interfaces in JAVA?
What are the parts of a method?
Can we have a try block without catch block?
Difference between this() and super() ?
There are two classes named classa and classb. Both classes are in the same package. Can a private member of classa can be accessed by an object of classb?
What is the main use of java?