Exercises
17.4 Fill in the blanks in each of the following statements:
a) Stream _________ are formed from stream sources, intermediate operations and terminal operations.
b) The following code uses the technique of _________ iteration:
int sum = 0;for (int counter = 0; counter < values.length; counter++) sum += values[counter];
c) Functional programming capabilities focus on _________ —not modifying the data source being processed or any other program state.
d) The functional interface _________ contains method accept
that takes a T
argument and returns void
; accept
performs a task with its T
argument, such as outputting the object, invoking a method of the object, etc.
e) The functional interface _________ contains ...
Get Java™ How To Program (Early Objects), Tenth Edition now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.