TreeMap 是以key做排序,因此key必須能比較,可實作 Comparable 介面或傳入 Comparator 的實作。 // 不保證順序不變HashMap<Integer, String> hashMap = ...
確定! 回上一頁