Frage im Vorstellungsgespräch bei Goldman Sachs

1 Do you know how to implement garbage cleaning in Java?

Antwort im Vorstellungsgespräch

Anonym

8. Jan. 2011

You cannot implement garbage collecting in Java. If you want garbage collection to occur, you have to use System.gc(); System.gc() is not a force call to the JVM, it merely is a suggestion to the JVM to do garbage collection. It is up to the JVM when garbage collection will occur. A simplified view of how garbage collection is implemented in the JVM: http://chaoticjava.com/posts/how-does-garbage-collection-work/