+ 7

Can keys be looped in hasmap?

HashMap<String, Character> q = new HashMap<String, Character>(); q.put("Hello",37); <<<<<<<here Can this be looped to print the value multiple times maby in a for or while loop? sololearn dosen't cover this very well so im unsure what types of methods i can use with it to call individual keys and values.

11th Oct 2017, 8:32 AM
D_Stark
D_Stark - avatar
2 odpowiedzi
+ 7
Yes
11th Oct 2017, 8:35 AM
👑 Prometheus 🇸🇬
👑 Prometheus 🇸🇬 - avatar
+ 5
show meeeee! 😜 my plan is to call a key loop it and to cast the value to char
11th Oct 2017, 9:16 AM
D_Stark
D_Stark - avatar