mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-05-01 18:58:31 +07:00
15 lines
346 B
Java
15 lines
346 B
Java
// "Replace Stream API chain with loop" "true"
|
|
|
|
import java.util.List;
|
|
|
|
import static java.util.Arrays.asList;
|
|
|
|
public class Main {
|
|
public static String test(List<String> list) {
|
|
return list.stream().r<caret>educe("", (a, b) -> a+b);
|
|
}
|
|
|
|
public static void main(String[] args) {
|
|
System.out.println(test(asList("a", "b", "c")));
|
|
}
|
|
} |