0
我有以下HashMap,其中鍵是String並且值由HashMap表示。更新HashMap中指定鍵的值
HashMap<String, HashMap<String, Integer> outerMap = new HashMap<String,HashMap<String, Integer>();
HashMap<String, Integer> innerMap = new HashMap<String, Integer>();
innerMap.put("Amount", 2000);
outerMap.put("TutionFee", innerMap);
現在我想更新Amount
鍵的值。如何更新Amount
密鑰的值?
檢查(HTTP [如何更新的值,因爲在Java HashMap中的關鍵字?]:// stackoverflow.com/questions/4157972/how-to-update-a-value-given-a-key-in-a-java-hashmap) – sam