可简化代码,优化性能
集合元素进行过滤 以J开头的元素且长度为4,存储到新的元素中,然后输出
结果
res = [Jack, JMas] Process finished with exit code 0
Stream写法
collect = [Jack, JMas] Process finished with exit code 0