crackyourinterview.com


To improves our performance please Like Share Subscribe(Will boost us)

Identify the intermediate and terminal operations in the code.
Question Posted on 12 Jan 2021Home >> Java >> Java8 Innards >> Identify the intermediate and terminal operations in the code.

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();
Choose the correct option from below list
(1)Intermediate:average Terminal: filter, mapToInt
(2)Intermediate: filter Terminal: mapToInt, average
(3)Intermediate: filter, mapToInt Terminal: getAsDouble
(4)Intermediate: filter, mapToInt Terminal: average

Answer:-(4)Intermediate: filter, mapToInt Terminal: average
0
0



.


Most Visited Questions:-

Deep Learning Questions Answers
Below are the different Deep Leaning Questions and answer a More...

Continuous Integration Questions Answers
Below are the 20 odd questions for CI or Continuous Integra More...

Derived relationships in Association Rule Mining are represented in the form of __________.
Derived relationships in Association Rule Mining are repres More...

What is Gulpjs and some multiple choice questions on Gulp
Gulpjs is an open source whihc helps in building Javascript More...

Microservices Architecture Questions Answers
Below are the different questions on Microservices Architec More...




Other Important Questions

Choose the correct option based on this code segment

Which of the following is correct about Java 8 lambda expression?

In Functional Reactive programming, we pull the stream of data.

Stream operation iterations are internal over the source of elements.

Choose the correct option based on this code segment in Java8 Innards Qsn






@2014-2022 Crackyourinterview (All rights reserved)
Privacy Policy - Disclaimer - Sitemap