Ver originalint l=0, m=0;for (int i = 0; i < numbers.length; i++) { if (numbers[i] < 500) { lessThan[l++] = numbers[i]; } else { higherThan[m++] = numbers[i]; } }