Map<String, Integer> scores = new HashMap<>();
scores.put("Alice", 90);
scores.put("Bob", 80);
scores.put("Charlie", 95);
System.out.println("Scores: " + scores);
Map<String, Integer> scores = new HashMap<>();
scores.put("Alice", 90);
scores.put("Bob", 80);
scores.put("Charlie", 95);
System.out.println("Scores: " + scores);
本文标题:Map和HashMap
本文链接:https://www.haomeiwen.com/subject/goptvdtx.html
网友评论