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