We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
2 parents 4978a39 + 456f536 commit a0ac4deCopy full SHA for a0ac4de
docs/java/new-features/java8-tutorial-translate.md
@@ -592,7 +592,7 @@ for (int i = 0; i < max; i++) {
592
```java
593
//串行排序
594
long t0 = System.nanoTime();
595
-long count = values.stream().sorted().count();
+long count = Arrays.stream(list.stream().sorted().toArray()).count();
596
System.out.println(count);
597
598
long t1 = System.nanoTime();
@@ -612,7 +612,7 @@ sequential sort took: 709 ms//串行排序所用的时间
612
//并行排序
613
614
615
-long count = values.parallelStream().sorted().count();
+long count = Arrays.stream(list.parallelStream().sorted().toArray()).count();
616
617
618
0 commit comments