mirror of
https://gitflic.ru/project/openide/openide.git
synced 2025-12-18 17:20:54 +07:00
10 lines
292 B
Java
10 lines
292 B
Java
// "Fuse 'toArray' into the Stream API chain" "true-preview"
|
|
import java.util.*;
|
|
import java.util.stream.Collectors;
|
|
import java.util.stream.Stream;
|
|
|
|
class Test {
|
|
public String[] testToArray(String[] args) {
|
|
return Arrays.stream(args).distinct().sorted().toArray(String[]::new);
|
|
}
|
|
} |