I have a map with integer keys and corresponding values of arrays of strings. I want to get a get a value out of that array from inside the map and am having a heck of a time doing this. My searches haven't yielded anything useful other than the recommendation to 'wrap it' and I'm really not sure what that means! Here is an example:
Map myTasks = new HashMap();
myTasks.put(1, new String[] {"cake"});
myTasks.put(15, new String[] {"bake"});
String myString = myTasks.get(1)[0]; // This doesn't work.
So I have picked up that myTasks.get(1) returns an object. How do I get a string value out of that object?
Thank you!