Java 的 Map 的排序方式如下。 如果要保證 Map 中的元素順序,不能使用 HashMap ,因為不保證元素的排序不變。 改用 LinkedHashMap 或 TreeMap 。
確定! 回上一頁