HashMap
-
[Java] HashMap 값 추출JAVA 2020. 2. 23. 21:47
import java.util.HashMap; import java.util.Iterator; import java.util.Map; import java.util.Map.Entry; import java.util.Set; public class extractHashMap { public static void main(String[] args) { Map hashMap = new HashMap(); hashMap.put("Key1", 1); hashMap.put("Key2", 2); hashMap.put("Key3", 3); hashMap.put("Key4", 4); hashMap.put("Key5", 5); // 방법1 Iterator keys = hashMap.keySet().iterator(); w..