mirror of
https://gitflic.ru/project/openide/openide.git
synced 2025-12-17 15:50:53 +07:00
11 lines
353 B
Java
11 lines
353 B
Java
// "Fuse 'toArray' into the Stream API chain" "true-preview"
|
|
import java.util.*;
|
|
import java.util.stream.Collectors;
|
|
import java.util.stream.Stream;
|
|
|
|
public class Test {
|
|
public String[] testToArray(String[] args) {
|
|
List<String> list = Arrays.stream(args).co<caret>llect(Collectors.toList());
|
|
return list.toArray(new String[list.size()]);
|
|
}
|
|
} |