mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-04-30 18:28:55 +07:00
12 lines
361 B
Java
12 lines
361 B
Java
// "Collapse loop with stream 'collect()'" "true-preview"
|
|
import java.util.*;
|
|
import java.util.stream.Collectors;
|
|
|
|
public class Test {
|
|
public static void main(String[] args) {
|
|
final double[] array = new double[10];
|
|
final List<Double> list = Arrays.stream(array).boxed().collect(Collectors.toList());
|
|
// Cannot be replaced with list.addAll()
|
|
}
|
|
}
|