From d077fdf04dad64d72c86522c71faa739a29392b9 Mon Sep 17 00:00:00 2001 From: Zhao Yuxin <78008034+SteamBoatv@users.noreply.github.com> Date: Thu, 11 Jul 2024 17:55:12 +0800 Subject: [PATCH] Update java8-tutorial-translate.md MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 在举例Stream中,Parallel Sort(并行排序)时,列举并行排序的例子里面,代码中的注释写成了“//串行排序所用的时间”。但其实是“//并行排序所用的时间” --- docs/java/new-features/java8-tutorial-translate.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/java/new-features/java8-tutorial-translate.md b/docs/java/new-features/java8-tutorial-translate.md index 42e2146eb74..9e0fd04ec70 100644 --- a/docs/java/new-features/java8-tutorial-translate.md +++ b/docs/java/new-features/java8-tutorial-translate.md @@ -595,7 +595,7 @@ System.out.println(String.format("parallel sort took: %d ms", millis)); ```java 1000000 -parallel sort took: 475 ms//串行排序所用的时间 +parallel sort took: 475 ms//并行排序所用的时间 ``` 上面两个代码几乎是一样的,但是并行版的快了 50% 左右,唯一需要做的改动就是将 `stream()` 改为`parallelStream()`。