mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-05-02 03:07:47 +07:00
16 lines
370 B
Java
16 lines
370 B
Java
// "Replace with toArray" "true"
|
|
|
|
import java.util.*;
|
|
|
|
public class Main {
|
|
public String[][] testToArray(List<String> data) {
|
|
List<String[]> result = new ArrayList<>();
|
|
for (String str : dat<caret>a) {
|
|
if (!str.isEmpty()) {
|
|
String[] arr = {str};
|
|
result.add(arr);
|
|
}
|
|
}
|
|
return result.toArray(new String[result.size()][]);
|
|
}
|
|
} |