My dear guys......Now I am going to tell you about a not very famouse thing in Opp and java.
Java supports a concept called finalization, which is just opposite to initialization.
That is the opposite of constructers...They are distructors.
You all konow that java run time has a garbage collector.
That is automstically object will add to the garbage collector and release the memory.
But non object will remain some resorses still.
So it is valuble to finalize the class.
How to finalize??..
It is simple...just add finalize() at the end of class and can be added to any class.
That is simple but valuable......
Java supports a concept called finalization, which is just opposite to initialization.
That is the opposite of constructers...They are distructors.
You all konow that java run time has a garbage collector.
That is automstically object will add to the garbage collector and release the memory.
But non object will remain some resorses still.
So it is valuble to finalize the class.
How to finalize??..
It is simple...just add finalize() at the end of class and can be added to any class.
That is simple but valuable......