Hey i just wanted to say that iam a java newbie.
so my problem is that the output is: a - null
and i dont know why
i did change the HashMap from HashMap<Integer[], Integer> testHashMap = new HashMap<>();
to HashMap<Integer, Integer> testHashMap = new HashMap<>();
and then i worked
HashMap<Integer[], Integer> testHashMap = new HashMap<>();
for (int i = 0; i < 10; i++) {
for (int j = 0; j < 10; j++) {
Integer[] someInteger = {i, j};
testHashMap.put(someInteger, (i + j * 4));
}
}
Integer[] someOtherInteger = {0,0};
System.out.println("a - " + testHashMap.get(someOtherInteger));
outPut:"a - null" outPut should be :"a - 0"
im sorry if this is like a dumb question.