mirror of
https://gitflic.ru/project/openide/openide.git
synced 2025-12-17 15:50:53 +07:00
18 lines
444 B
Java
18 lines
444 B
Java
// "Replace Stream API chain with loop" "true-preview"
|
|
|
|
import java.util.*;
|
|
import java.util.stream.*;
|
|
|
|
public class Main {
|
|
private static void test(List<String> test) {
|
|
StringBuilder sb = new StringBuilder();
|
|
for (String s : test) {
|
|
sb.append(s);
|
|
}
|
|
System.out.println("x"+ sb.toString() +"y");
|
|
}
|
|
|
|
public static void main(String[] args) {
|
|
System.out.println(test(Arrays.asList("a", "b", "c")));
|
|
}
|
|
} |