有實作 Comparable 介面的集合,可以透過重寫 compareTo() 實現比較,
若對象無法重寫,可以透過實作 Compartor 介面建立比較的物件來排序。
Last updated 5 years ago