int[] answer= new int[map.size()];
HashMap map = new HashMap();
for (int j=0; j int x=map.get(keys.get(j));
answer[j]=x;
}
return answer
When I print x
using System.out.println(x)
in the loop, I get values of 1, 2, 3
but when I return the answer and print it, I get [I@9826ac5
. Any idea why?
No comments:
Post a Comment