aspose file tools
The moose likes Java in General and the fly likes gc() method Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of OCA Java SE 8 Programmer I Study Guide 1Z0-808 this week in the OCAJP forum!
JavaRanch » Java Forums » Java » Java in General
Bookmark "gc() method" Watch "gc() method" New topic

gc() method

jose chiramal
Ranch Hand

Joined: Feb 12, 2010
Posts: 266
Why do we have the gc() method in both the System class and the Runtime class. Is there any specific reason ?
David Newton

Joined: Sep 29, 2008
Posts: 12617

As the documentation states, System.gc() basically calls the Runtime method. I'd assume convenience.
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
subject: gc() method