mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-05-03 03:37:58 +07:00
16 lines
337 B
Java
16 lines
337 B
Java
// "Replace with toArray" "true"
|
|
|
|
import java.util.*;
|
|
|
|
public class Test {
|
|
public static String[] test(String[] args) {
|
|
List<String> list = new ArrayList<>();
|
|
for(String s : ar<caret>gs) {
|
|
if(!s.isEmpty())
|
|
list.add(s);
|
|
}
|
|
Set<String> set = new TreeSet<>(list);
|
|
return set.toArray(new String[0]);
|
|
}
|
|
}
|