I have the following HashMap:-
HashMap<Integer,Integer[]> possibleSeq = new HashMap<Integer,Integer[] >();
I would like to add into the map something like this:-
possibleSeq.put(1,{1,2,3,4});
There are a large number of entries and i am supposed to enter manually:- I tried doing this:-
Integer a = 1;
Integer aArr = {1,2,3,4};
possibleSeq.put(a,aArr);
But this is not my requirement.I dont want to create separate Integer variables to store keys and separate Integer Arrays to store my values ie IntegerArray .Any Ideas??
Integer[]
? I'm pretty sure you needint[]
. - Marko Topolnik