I am trying to build a HashMap which will have integer as keys and objects as values.
My syntax is:
HashMap myMap = new HashMap&
I don't understand why I should add a dimension (ie: making the int into an array) since I only need to store a digit as key.
An array is also an Object, so HashMap is a valid construct that uses int arrays as keys.
Compiler doesn't know what you want or what you need, it just sees a language construct that is almost correct, and warns what's missing for it to be fully correct.