I have the following HashMap
:
HashMap<Integer,HashMap<Integer,ArrayList<Integer>>> hm = new HashMap<>();
When I do this:
Set<Integer> keys = hm.keySet();
for(int i : keys) System.out.println(i + ": " +hm.get(i));
I have an output like this:
2: {2=[1, 2, 3, 4]}
How can I go through the HashMap
principal, to have access to the keys and values of HashMap
inner?