違いは何ですか
Runtime.exit(0) と System.exit(0)
同様に、違いは何ですか
Runtime.gc() と System.gc()
いつどれを使う?
System.Xxxx の方が短いです。Runtime.Xxxx() を直接使用することはできません。
違いは何ですか
Runtime.exit(0) and System.exit(0)
なし。
同様に、違いは何ですか
Runtime.gc() and System.gc()
なし。
いつどれを使う?
違いがないので、選択は純粋に表面的なものです。
javadocs を見てみましょう: http://docs.oracle.com/javase/1.5.0/docs/api/java/lang/System.html#exit(int )
「呼び出し System.exit(n) は実質的に次の呼び出しと同等です: Runtime.getRuntime().exit(n)」