Garbage collector is fully under control with JVM, so it decide when to run it. But within a program you can ask JVM to run the garbage collector too. But in that case there is no guarantee that JVM...