Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions docs/java/new-features/java8-tutorial-translate.md
Original file line number Diff line number Diff line change
Expand Up @@ -592,7 +592,7 @@ for (int i = 0; i < max; i++) {
```java
//串行排序
long t0 = System.nanoTime();
long count = values.stream().sorted().count();
long count = Arrays.stream(list.stream().sorted().toArray()).count();
System.out.println(count);

long t1 = System.nanoTime();
Expand All @@ -612,7 +612,7 @@ sequential sort took: 709 ms//串行排序所用的时间
//并行排序
long t0 = System.nanoTime();

long count = values.parallelStream().sorted().count();
long count = Arrays.stream(list.parallelStream().sorted().toArray()).count();
System.out.println(count);

long t1 = System.nanoTime();
Expand Down