top button
Flag Notify
    Connect to us
      Facebook Login
      Site Registration Why to Join

Facebook Login
Site Registration

What is the difference between final, finally and finalize methods in Java?

+1 vote
67 views
What is the difference between final, finally and finalize methods in Java?
posted Dec 11, 2014 by Joy Nelson

Share this question
Facebook Share Button Twitter Share Button LinkedIn Share Button

2 Answers

0 votes

The keyword is final.sss

It is used for declaring a constant

It prevents a class from producing subclasses.

finally is a code.

It always executes when the try block is finished,
Unless System.exit() has been called.

finalize() is a method,

Before discarding by the garbage collector it is invoked .

answer Dec 12, 2014 by Karthick.c
0 votes

To be concise
Final keyword is used for making constants and declaring a method inheritable...
Finally is a block and is used in try catch block,and
Finalize() is used in garbage collector...

answer Dec 18, 2014 by anonymous
Contact Us
+91 9880187415
sales@queryhome.net
support@queryhome.net
#280, 3rd floor, 5th Main
6th Sector, HSR Layout
Bangalore-560102
Karnataka INDIA.
QUERY HOME
...