Java Final, Finally and Finalize

Final:
A method or variable that can't be overridden
Finally: A block of code added after try / catch block. This block is guarnteed to execute even if due to a problem method returns from the catch block
Finalize: a method which is your destructor method - code that's run to clean up objects that are no longer required. For example, objects which are memory cached would be flushed back to the disc in your finalize. (There is no guarantee that this will run or "when" will it call the garbage collector)

Comments

Popular posts from this blog

Impossible