mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-04-30 18:28:55 +07:00
11 lines
286 B
Java
11 lines
286 B
Java
// "Collapse loop with stream 'collect()'" "true-preview"
|
|
|
|
import java.util.List;
|
|
import java.util.stream.Collectors;
|
|
|
|
public class Test {
|
|
private static String work2(List<String> strs) {
|
|
String sb = strs.stream().collect(Collectors.joining(",", "{", "}"));
|
|
return sb;
|
|
}
|
|
} |