I want to map an array to an ArrayList such that two arrays mapped to the same thing if they are identical.
This outputs null:
HashMap<int[], Integer> map = new HashMap<>();
map.put(new int[1], 0);
System.out.println(map.get(new int[1]));
And I want the output to be 0. Is there an easy way to do this? Should I use TreeMap? How do I do this in TreeMap?