2012-04-25 85 views

回答

2

的系統.Xxxx更短。 Runtime.Xxxx()不能直接使用。

0
+0

Java 1.4 docs ?? – 2012-04-25 10:26:41

+0

爲什麼不呢?這是真的,現在仍然是。 但肯定,在這裏:http://docs.oracle.com/javase/7/docs/api/java/lang/System.html – Dariop 2012-04-25 10:40:07

+0

是的,但當然沒有好的理由鏈接到過時的文檔,而不是當前在這種情況下。 – 2012-04-25 10:57:49

1

是什麼

Runtime.exit(0) and System.exit(0) 

無之間的差異。

同樣是什麼

Runtime.gc() and System.gc() 

無之間的差異。

什麼時候用哪個?

由於沒有區別,選擇純粹是美容。

相關問題