mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-05-02 19:28:23 +07:00
17 lines
387 B
Java
17 lines
387 B
Java
// "Replace with toArray" "false"
|
|
|
|
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);
|
|
}
|
|
Object[] arr = result.toArray();
|
|
System.out.println(result);
|
|
return arr;
|
|
}
|
|
} |