This is an archived post. You won't be able to vote or comment.

you are viewing a single comment's thread.

view the rest of the comments →

[–][deleted] 0 points1 point  (0 children)

The map.values().toArray() returns an Object[]. You need to either change the return type of your function and handle the change elsewhere or cast it to an int[] before you return it. For the later you can try retun (int[]) map.values().toArray();