I am trying to create a HashMap which will look like this
key. value
1. [[1,2,5][4,5]]
2. [[12,2][45,54]]
3. [[1,23][43,25]]
I get these values from the user as a ArrayList. How do I add the values to the map
i declared tha map as
HashMap<Integer,ArrayList<ArrayList<Integer>>> map = new HashMap<>();
I tried to insert the value like
map.put(i,new ArrayList<ArrayList<Integer>>>(userInput));
but I get a error since userInput is just ArrayList
userInput?