📅  最后修改于: 2022-03-11 14:52:22.004000             🧑  作者: Mango
// 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();