I have a problem in understanding how to readout a array that I put into the hash map. (By the way I need to put in different data types into the hash map, single values and also arrays, thatsway I use the generic "Object" type).
Example Code:
HashMap map = new HashMap();
map.put("two", new int[]{1,2});
int[] myArray = new int[2]:
myArray = (int[])map.get("two");
System.out.println("Array value "+myArray[0]);
System.out.println("Array value "+myArray[1]);
I get an error during runtime...
I hope somebody can give me a hint. I can't find my mistake.
Thanks a lot. Steffen