Collections和Arrays的默認排序

參考https://blog.csdn.net/bruce_6/article/details/38299199 總圖: Arrays.sort(str);    str爲Object[] Collections.sort(array);   array爲List<Type> JDK 1.6及1.6以前使用,不加比較器是因爲其實現了Comparable接口,加入比較器就按照比較器的規則來比較   
相關文章
相關標籤/搜索