Originally posted by Shyamsundar Gururaj:
Overloading the finalize() method [b]is allowed, but only the method with the original finalize() signature will be called by the garbage collector. Moreover,the new definition cannot contradict the original definition.
As far as overriding is concerned, the finalize() method is declared protected in Object. Therefore, the overriding methods can be only protected or coderanch.
Hope this Helps,
Shyam[/B]
If the new overloaded finalizer() method cannot contradict the original finalizer() how can you overload this method?
protected void finalizer() //
protected int finalizer() // Not a overloading
protected void finalizer(5) //Different Signature so overloading
//But it wont compile!!!
So i dont think you can overload a finalizer...
Please correct me if i am wrong
Thankx Shyam
ragu