mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-01-11 20:07:01 +07:00
14 lines
321 B
Java
14 lines
321 B
Java
// "Replace with toArray" "true"
|
|
|
|
import java.util.*;
|
|
|
|
public class Main {
|
|
public Object[] testToArray(List<String> data) {
|
|
Set<String> result = new TreeSet<>();
|
|
for (String str : d<caret>ata) {
|
|
if (!str.isEmpty())
|
|
result.add(str);
|
|
}
|
|
return result.toArray(new String[result.size()]);
|
|
}
|
|
} |