你可以这样做:
IntStream.range(0, numbers.length) .forEach(index -> { doubleNumbers[index] = numbers[index] * 2; tripleNumbers[index] = numbers[index] * 3; });