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

1) Lambda expressions can be used anywhere functional interfaces are expected.
2) Terminal operations are lazy—they perform the requested operation when they are
called.
3) Method reduce’s first argument is formally called an identity value—a value that, when combined with a stream element using the IntBinaryOperator, produces the stream el ement’s original value. For example, when summing the elements, the identity value is 1, and when getting the product of the elements, the identity value is 0.
4) Stream method findFirst is a short-circuiting terminal operation that processes the stream pipeline but terminates processing as soon as an object is found.
5) Stream method flatMap receives a Function that maps a stream into an object. For ex- ample, the object could be a String containing words and the result could be another intermediate Stream for the individual words.
6) When a class implements an interface with default methods and overrides them, the class inherits the default methods’ implementations. An interface’s designer can now evolve an interface by adding new default and static methods without breaking ex- isting code that implements the interface.


1) True.
2) False. Terminal operations are eager—they perform the requested operation when they are called.
3) False. When summing the elements, the identity value is 0, and when getting the product of the elements, the identity value is 1.
4) True.
5) False. Stream method flatMap receives a Function that maps an object into a stream.
6) False. Should say: “…does not override them, …” instead of “overrides them.”

Computer Science & Information Technology

You might also like to view...

In ____________________, the hacker can see both parties, observe the responses from the target computer, and respond accordingly.?

Fill in the blank(s) with the appropriate word(s).

Computer Science & Information Technology

Briefly describe the main characteristics of economic loss as a result of a spoofing attack.

What will be an ideal response?

Computer Science & Information Technology

197.169.73.63 is an example of a(n) ________

A) packet B) network prefix C) IP address D) domain name

Computer Science & Information Technology

The Start menu in Windows Vista has the same appearance and works the same as previous versions of Windows

Indicate whether the statement is true or false

Computer Science & Information Technology