Answer the following statements true (T) or false (F)

1) An intermediate operation specifies tasks to perform on the stream’s elements; this is
efficient because it avoids creating a new stream.
2) Reduction operations take all values in the stream and turn them into a new stream.
3) If you need an ordered sequence of int values, you can create an IntStream containing
such values with IntStream methods range and rangeClosed. Both methods take two
int arguments representing the range of values. Method rangeClosed produces a se-
quence of values from its first argument up to, but not including, its second argument.
Method range produces a sequence of values including both of its arguments.
4) Class Files (package java.nio.file) is one of many classes throughout the Java APIs
that have been enhanced to support Streams.

1) False. An intermediate operation specifies tasks to perform on the stream’s elements and results in a new stream.
2) False. Reduction operations take all values in the stream and turn them into a single value.
3) False. Method range produces a sequence of values from its first argument up to, but not including, its second argument. Method rangeClosed produces a sequence of val- ues including both of its arguments.
4) True.

Computer Science & Information Technology

You might also like to view...

You can ________ a graphic to reduce the file size

A) remove the background of B) crop C) compress D) collapse

Computer Science & Information Technology

In the Properties window, which tab displays the space remaining on the computer's hard disk?

A. Hardware B. Security C. General D. Sharing

Computer Science & Information Technology