HashMap是無序的,根據hash 值隨機插入。如果想使用有序的Map,可以使用LinkedHashMap 或者TreeMap。 21.講講LinkedHashMap 怎麼實現有序的?
確定! 回上一頁