what are the differences between final,finally,finalize
methods?
Answer Posted / brijendra(xavient)
1-Final:Java have final class,finalmethod and
finalvariables.
*Finalclass can not be extended and the variables under the
final class can not be change.
*Finalvariables can not be changed.
*finalmethods can not be override or overriden.
2-Finally-Finally is a block which is used for catching the
uncaught exception which not handled by try block.
3-Finalize()- finalize method helps in garbage collection.A
method,that is invoked before an object is discarded by the
garbage
collector, allowing it to clean up its state
| Is This Answer Correct ? | 1 Yes | 0 No |
Post New Answer View All Answers
What is json parser in java?
How java is similar to c?
Enlist few advantages of inheritance?
What's the access scope of protected access specifier?
how we can make a write-only class in java?
What is the purpose of the runtime class in java programming?
What is the difference between inner class and nested class?
Is binary a low level language?
What is file in java?
What is the use of static methods?
What is the major difference between linkedlist and arraylist?
How do you use nextline in java?
What is the main method java?
What is a bufferedreader?
What about anonymous inner classes in java?