mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-01-10 18:09:38 +07:00
13 lines
360 B
Java
13 lines
360 B
Java
// "Replace with collect" "true"
|
|
|
|
import java.util.List;
|
|
import java.util.stream.Collectors;
|
|
|
|
public class Test {
|
|
static String test(List<String> list) {
|
|
String sb;
|
|
System.out.println("hello");
|
|
sb = list.stream().filter(s -> !s.isEmpty()).map(s -> s.substring(0, 1)).collect(Collectors.joining());
|
|
return sb.length() == 0 ? null : sb;
|
|
}
|
|
} |