Skip to content

Commit fb2b6dd

Browse files
committed
Add getOrDefault to testMap.java
1 parent c2459a8 commit fb2b6dd

1 file changed

Lines changed: 2 additions & 0 deletions

File tree

TestMap.java

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,5 +23,7 @@ public static void main (String[] args) {
2323
System.out.println(entry.getKey() + ": " + entry.getValue());
2424
}
2525

26+
System.out.println("Anna: " + testMap.getOrDefault("Anna", 0));
27+
System.out.println("Jack: " + testMap.getOrDefault("Jack", 0));
2628
}
2729
}

0 commit comments

Comments
 (0)