Like This Site? 
 
RSS Feed Follow Us 

on Twitter! Be Our Fan!

Finalize(), Finally and Final in Java

Share this post!
 Vote this!

There's some confusion in the mind of an intermediate level programmer about finalize(),finally and final in java. So to remove that confusion from each and everyone's mind I thought of writing a post on it.

finalize() :  A Method

finally : A Clause in Try-Catch

final :  Keyword in java


Finalize :

It is called by the garbage collecter on an object by garbage collection when it knows that there is no references on the object. The finalize() method is defined in the java.lang.Object class and its modifier is defined as protected. The finalize() method is not public  because it should only be invoked by JVM and not by anyone else and protected so that it can be overridden by the subclasses.  more...

0 comments:

Post a Comment