Other people's mistakes once again block our path to a brighter future. On the contrary, maybe they actually form the path: it's hard to become a programmer without them. Take this non-functioning program and rework it so it compiles. It demonstrates how a HashMap works: read pairs (a number and string) from the keyboard, put them in a HashMap, and then display its contents.
Corrections are needed
- 3
Locked
Comments (3)
- Popular
- New
- Old
You must be signed in to leave a comment
Devonte A
23 June 2020, 12:57
Tip - Remove null value!
+2
MoJo
29 September 2020, 16:50
This works, but by looking at 'help' i found out that there's a cleaner way. Take a close look at the Solution() constructor and you might find the reason, why there is a 'null' instance...
+1
Bhuvana Kumar
6 January 2021, 11:44
Thanks
0