title: When does System.gc() do something?
body: <p>I know that garbage collection is automated in Java. But I understood that if you call <code>System.gc()</code> in your code that the JVM may or may not decide to perform garbage collection at that point. How does this work precisely? On what basis/parameters exactly does the JVM decide to do (or not do) a GC when it sees <code>System.gc()</code>?</p>
  
  <p>Are there any examples in which case it's a good idea to put this in your code?</p>