Skip to content

Commit

Permalink
Merge pull request #2427 from SteamBoatv/patch-1
Browse files Browse the repository at this point in the history
Update java8-tutorial-translate.md
  • Loading branch information
Snailclimb authored Jul 11, 2024
2 parents a88ad33 + d077fdf commit 1452df2
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion docs/java/new-features/java8-tutorial-translate.md
Original file line number Diff line number Diff line change
Expand Up @@ -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()`。
Expand Down

0 comments on commit 1452df2

Please sign in to comment.