A friendly place for programming greenhorns!
Big Moose Saloon
Register / Login
Programmer Certification (SCJP/OCPJP)
finalize() method - protected
Joined: Jan 17, 2005
Jul 05, 2005 08:27:00
The finalize() method is declared protected in the Object class, then only classes in the same package or subclasses can call it. Then how will the garbage collector code access this method ?
Joined: May 28, 2004
Jul 05, 2005 09:27:00
All objects extend the Object class, by default!
I agree. Here's the link:
subject: finalize() method - protected
Object class method access specifier
why finalize() method is protected?
All times are in JavaRanch time: GMT-6 in summer, GMT-7 in winter
| Powered by
Copyright © 1998-2013