📜  java 将值添加到数组 - Java 代码示例

📅  最后修改于: 2022-03-11 14:52:24.051000             🧑  作者: Mango

代码示例4
// If you read array of unknown length, from console
// and you want to put numbers into array of fixed length
long[] array = Arrays.stream(scanner.nextLine().split(" "))
                .mapToLong(Long::parseLong)
                .toArray();