import java.util.Arrays;
public class Streams9 {
public static void main(String[] args) {
Arrays.asList(
"a1",
"a2",
"b1",
"c2",
"c1")
.stream()
.filter(s -> s.startsWith(
"c"))
.map(String::toUpperCase)
.sorted()
.forEach(System.
out::println);
}
}
转载于:https://www.cnblogs.com/bilaisheng/p/10210929.html