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