I am working on OOP-2 and running into hashmap issue. Here is what I have (in words).
I created a HashMap<String, int>, initialized it to the one I wanted but when I am getting (get()) it using the 'key', the compiler gives me an error which says:
found: java.lang.Object required: int
when assigning to an int.
Since I put int on my hashmap, should I not get an int back?
Also, I tried to assign it to Object and compiled okay. The only thing is I need a number in order for me make some multiplication.
So if the numberString array is a String array (and  is actually populated with a String), and the key of the HashMap is a String.... and 'number' is an Integer..... and the Map was declared as <String, Integer>.....
it seems you're doing everything right.
I just want to remind you that, well I'm 95% sure, HashMap and other Collections like it (TreeMap, ArrayList) don't hold primitives... they hold wrapper/boxed classes. That could be the issue why you're getting an "Object" and it expects an "int". You may try casting the int 'number' as an Integer, but autoboxing should take care of that. **shrug**
P.S. If your HashMap is really named hashMap, it's not good naming convention. I dunno if the Nitpickers nitpick that, but I will.