What is the difference between System.gc() and Runtime.gc()?
System.gc()
Runtime.gc()
See the docs
System.gc() is equivalent to Runtime.getRuntime().gc()
Runtime.getRuntime().gc()