File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
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 REST with Spring (video course) this week in the Spring 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.
I agree. Here's the link:
subject: gc() method
It's not a secret anymore!