Afternoon
I am a little stuck on something.
The code below is from something I am writing for the
Java Ranch. OOP-2 NaturalLanguageMultiply
Given a
string, I need to be able to check if that string is in my hashmap and if not then throw an exception
This works fine and dandy if I have a string that creates two elements in the array (String number = "two-three";) but if it only has one, (String number = "three";), I get a ArrayIndexOutOfBoundsException
I am stuck! Any pointers on how to do this?
Cheers!