Calling GC routine in alternative ways

From: lonelyplanet999 (
Date: 03/07/04

Date: 7 Mar 2004 08:57:32 -0800


I know two ways to call JVM garbage collector:

1) Calling System.gc() directly.
2) Create an Runtime instance first then call its gc() like

Runtime rt = Runtime.getRuntime();

I would like to know what's the difference between ?