借鉴https://blog.csdn.net/zixiao217/article/details/70196751
另:使用forEach(a->{})方法的{}中,若有外部变量,则该外部变量只能是final修饰赋值的,否则编译不通过。