I am migratimg an old visual basic application to Android and as I progressed I ran into some problems i can't solve. (I'm new to java)
In VB there is something called Dictionary and after googling the equivalent in java I come to the conclusion the thing to use is HashMap.
I need to create a HashMap with a string as key and an int[] as object:
HashMap<String, int[]> hm
So far, so good. I learned that after creating my int[] I set the HashMap the following way...
int[] intArray = new int[23];
hm.put("myRandomString", intarray);
Now to the problem, how can I change the value on position x in my intArray?
I know I will use the key to find the intArray but anything I try give me an error.
intArray[x] = 4for example.intArray? Why do you need to get it back from the map?