< prev index next >

src/java.base/share/classes/java/util/stream/package-info.java

Print this page

        

@@ -314,11 +314,11 @@
  * implementation can optimize away the execution of behavioral parameters
  * without affecting the result of the computation.  (For a specific example
  * see the API note documented on the {@link java.util.stream.Stream#count count}
  * operation.)
  *
- * <p>Many computations where one might be tempted to use side effects can be more
+ * <p>Many computations where one might be tempted to use side-effects can be more
  * safely and efficiently expressed without side-effects, such as using
  * <a href="package-summary.html#Reduction">reduction</a> instead of mutable
  * accumulators. However, side-effects such as using {@code println()} for debugging
  * purposes are usually harmless.  A small number of stream operations, such as
  * {@code forEach()} and {@code peek()}, can operate only via side-effects;

@@ -443,11 +443,11 @@
  * burden of parallelizing the reduction operation, and the library can provide
  * an efficient parallel implementation with no additional synchronization
  * required.
  *
  * <p>The "widgets" examples shown earlier shows how reduction combines with
- * other operations to replace for loops with bulk operations.  If {@code widgets}
+ * other operations to replace for-loops with bulk operations.  If {@code widgets}
  * is a collection of {@code Widget} objects, which have a {@code getWeight} method,
  * we can find the heaviest widget with:
  * <pre>{@code
  *     OptionalInt heaviest = widgets.parallelStream()
  *                                   .mapToInt(Widget::getWeight)
< prev index next >