java4all@1986 java. Powered by Blogger.

Difference Between Final,Finally and finalize()?

>> Monday, May 23, 2011

Final:
1.It is a modifier applicable for classes,methods and variables.
2.for the final classes we can't create child class that is inheritance is not possible.
3.Final methods can be overridden in child class.
4.for final variables re-assignment is not possible.

Finally:
1.It is a block associated with try,catch .
2.The main objective of finally block is to maintain clean-up code, which should be execute always.

Finalize:
1. It is a method ,should be execute by the garabage collector,just before destorying a object












0 comments:

Post a Comment

FaceBook Login

HTML/JAVASCRIPT

HTML/JAVASCRIPT

HTML/JAVASCRIPT

HTML/JAVASCRIPT

Total Pageviews

STATCOUNTER

  © Blogger template Simple n' Sweet by Ourblogtemplates.com 2009

Back to TOP