✅ The verified answer to this question is available below. Our community-reviewed solutions help you understand the material better.
Mida kuvatakse konsooli?
Map<String, List<Integer>> data = new HashMap<>();data.put("A", new ArrayList<>(List.of(1, 2, 3)));data.put("B", new ArrayList<>(List.of(4, 5)));data.put("C", new ArrayList<>(List.of(6)));
int total = 0;for (Map.Entry<String, List<Integer>> entry : data.entrySet()) { if (entry.getValue().size() > 1) { for (Integer num : entry.getValue()) { total += num; } }}System.out.println(total);