mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-05-01 18:58:31 +07:00
10 lines
256 B
Java
10 lines
256 B
Java
// "Collapse loop with stream 'toArray()'" "true-preview"
|
|
|
|
import java.util.*;
|
|
|
|
public class Test {
|
|
public static String[] test(String[] args) {
|
|
return Arrays.stream(args).filter(s -> !s.isEmpty()).distinct().sorted().toArray(String[]::new);
|
|
}
|
|
}
|