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...

Write the syntax for an ifconfig command that sets the IP address of the interface eth0 to 128.143.2.3/16 with broadcast address 128.143.255.255.

What will be an ideal response?

Computer Science & Information Technology

A __________ is used to represent a single character in a UNIX file name.

a. * (asterisk) b. slash c. backslash d. question mark (?)

Computer Science & Information Technology

A wireless printer can be connected to multiple computers

Indicate whether the statement is true or false

Computer Science & Information Technology

To generate a program that can be executed by the computer requires that the C++ program, which is referred to as a source program, be translated into the computer's ____.

A. data B. machine language C. objects D. classes

Computer Science & Information Technology