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
Can we declare register variable as global?
What is a default constructor and also define copy contrucyor?
What will be the output of round(3.7) and ceil(3.7)?
Explain what are final variable in java?
Are arrays passed by reference in java?
What is difference between adapter class and listener?
Can a constructor call another constructor?
What is the size of int in 64-bit jvm?
Tell me about different OOPS concepts.
What is multi-catch block in java?
Write a program to print fibonacci series up to count 10.
Explain when we should make an instance variable private.
Can list be final in java?
Why multiple inheritance is not supported by java?
What an i/o filter in java programming?