Corrections are needed

  • 3
  • Locked
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.
You can't complete this task, because you're not signed in.
Comments (3)
  • Popular
  • New
  • Old
You must be signed in to leave a comment
Devonte A
Level 18 , Rubery, United Kingdom
23 June 2020, 12:57
Tip - Remove null value!
Level 22 , Cairns, Australia
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...
Bhuvana Kumar
Level 14 , Mumbai, India
6 January 2021, 11:44