如果傳入的參數是null 時, equals 總是回傳false,而compareTo 則是丟出java.lang.NullPointerException。 範例如下: "foo".equals((String)null) // 回 ...
確定! 回上一頁