Calling GC routine in alternative ways

From: lonelyplanet999 (lonelyplanet999_at_my-deja.com)
Date: 03/07/04


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

Hi,

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();
rt.gc()

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

:)