0 votes
in JAVA by
Identify the intermediate and terminal operations in the code.

double average = roster

  .stream()

  .filter(p -> p.getGender() == Person.Sex.MALE)

  .mapToInt(Person::getAge)

  .average()

  .getAsDouble();

a) Intermediate: filter, mapToInt Terminal: average

b) Intermediate: filter Terminal: mapToInt, average

c) Intermediate:average Terminal: filter, mapToInt

d) Intermediate: filter, mapToInt Terminal: getAsDouble

1 Answer

0 votes
by
a) Intermediate: filter, mapToInt Terminal: average

Related questions

0 votes
asked Jun 30, 2022 in JAVA by sharadyadav1986
0 votes
0 votes
asked Mar 1, 2023 in JAVA by sharadyadav1986
...