目录 前言 一、示例 二、原理 1 构建并行流 2 执行forEach( ) 前言 本文讲解一下并行流的forEach方法 一、示例 public class StreamTest { private List<Integer> data = new ArrayList<>(); private static int length = 100; @Before public