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


Please Help Members By Posting Answers For Below Questions

Why are data types important?

531


What are three types of loops in java?

583


Explain thread in java?

658


What is meant by 'bit masking' in java?

642


What is finalize()?

598






What is class level lock ?

606


How to perform merge sort in java?

579


Will the jvm load the package twice at runtime?

570


What does string mean in java?

623


How many tetrahedral voids are there in bcc?

540


Explain java thread life cycle.

577


What are the rules for naming an array?

520


Can a class have more than one object?

520


What are different types of expressions?

546


why Interface used?

533