mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-01-07 13:27:34 +07:00
12 lines
291 B
Java
12 lines
291 B
Java
// "Collapse loop with stream 'toArray()'" "true-preview"
|
|
|
|
import java.util.Arrays;
|
|
import java.util.List;
|
|
|
|
public class Test {
|
|
public void test(List<Integer> ints) {
|
|
long[] arr = ints.stream().mapToLong(anInt -> anInt).toArray();
|
|
System.out.println(Arrays.toString(arr));
|
|
}
|
|
}
|