i have source code like this
public class Solution {
private static List<Integer[]> twoSum(int[] numbers, int targets) {
Map<Integer, Integer> arrayMap = new HashMap<>();
List<Integer[]> pairList = new ArrayList<>();
for (int i = 0; i < numbers.length; i++) {
if (arrayMap.containsKey(targets - numbers[i])) {
Integer[] temp = { arrayMap.get(targets - numbers[i]), i }; // Put the previous and current index
pairList.add(temp);
}
else arrayMap.put(numbers[i], i);
}
return pairList;
}
public static void main(String[] args) {
// TODO Auto-generated method stub
int[]nums = {2, 7, 2, 11, 15};
int target=9;
System.out.println(Arrays.toString(nums));
List<Integer[]> index =twoSum(nums, target);
System.out.println(index.toString());
}
}
but i want to run i got error like this
[[Ljava.lang.Integer;@26f0a63f]
how to fix my problem ?