```
public static int[] twoSum(int[] numbers, int target) {
int m = 0;
int n = 1;
int outSum[] = new int[2];
while (m < numbers.length) {
if (n>numbers.length-1) {
m++;
n=m+1;
} else {
if (numbers[m] + numbers[n] == target) {
outSum[0] = m + 1;
outSum[1] = n + 1;
m = numbers.length;
} else {
n++;
}
}
return outSum;
}
}
```