WHAT IS DIFFERENCE BETWEEN FINAL, FINALLY AND FINALIZE?

Mayank Tripathi

Total Post:807

Points:4035
Posted by  Mayank Tripathi
Java 
 585  View(s)
Ratings:
Rate this:
  1. Mayank Tripathi

    Post:807

    Points:4035
    What is difference between final, finally and finalize?

    final: final is a keyword, final can be variable, method or class.You, can't change the value of final variable, can't override final method, can't inherit final class.
    finally: finally block is used in exception handling. finally block is always executed.
    finalize():finalize() method is used in garbage collection.finalize() method is invoked just before the object is garbage collected.The finalize() method can be used to perform any cleanup processing.

Answer

NEWSLETTER

Enter your email address here always to be updated. We promise not to spam!