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
Why are data types important?
What are three types of loops in java?
Explain thread in java?
What is meant by 'bit masking' in java?
What is finalize()?
What is class level lock ?
How to perform merge sort in java?
Will the jvm load the package twice at runtime?
What does string mean in java?
How many tetrahedral voids are there in bcc?
Explain java thread life cycle.
What are the rules for naming an array?
Can a class have more than one object?
What are different types of expressions?
why Interface used?