Created
April 15, 2021 07:23
-
-
Save tremaineeto/de014c18824bf3e8e12361698f365c1d to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
HashMap<String, Integer> hm = new HashMap<>(); | |
hm.add("a", 1); | |
hm.add("b", 2); | |
hm.add("c", 3); | |
hm.add("d", 4); | |
int b = hm.getOrDefault("b", 99); | |
int e = hm.getOrDefault("e", 99); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment