📅  最后修改于: 2022-03-11 14:55:40.809000             🧑  作者: Mango
public static void main(String[] args) {
ArrayList stringList = new ArrayList<>();
stringList.add("a");
stringList.add("b");
stringList.add("c");
stringList.stream().forEach(str -> {
if (str.equals("b")) return; // only skips this iteration.
System.out.println(str);
});
}