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

What is java developer skills?

511


Why put method is used?

526


How many types of parsers are there?

544


How to sort numbers in java without array?

528


Can we catch more than one exception in single catch block?

599






What is the maximum size of hashmap in java?

535


we have syntax like for(int var : arrayName) this syntax is to find whether a number is in the array or not.but i want to know how to find that number's location.

1568


Can we call the constructor of a class more than once for an object?

627


What are peerless components in java programming?

581


What is parse method?

539


Explain the difference between static and dynamic binding in java?

543


Explain the difference between abstract classes and interfaces in java?

598


What is the symbol for average?

514


What is the base class in java from which all classes are derived?

515


What is %d in printf?

526