Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Question about the Garbage Collector

Status
Not open for further replies.

Guest_imported

New member
Jan 1, 1970
0
I would like to ask, why the Garbage collector cannot be a subclass of the class implementing the finalize() method or in the same package?

I know the finalize() method must be declared to be protected, and a protected method can only ve accessed by subclasses or classes in the same package.Also, finalize() method is called by the Garbage Collector before an object is destroyed...
 
The garbage collector is part of the runtime environment. It's more like an operating system thing.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top