You can add multiple key-value pairs to the HashMap by calling the put() method multiple times. HashMap<String, Integer> map = new HashMap<>(); map.put("Apple" ...
確定! 回上一頁