Banco Do Brasil Agente De Tecnologia Practice Questions - Banco Do Brasil Escriturário - Agente De Tecnologia (TI) Exam

Access More Questions
Consider the following Java Streams pipeline intended to calculate the total transaction volume for approved credit operations: ```java BigDecimal total = transactions.stream() .filter(t -> t.getStatus() == Status.APPROVED) .map(Transaction::getAmount) .reduce(BigDecimal.ZERO, BigDecimal::add); ``` What is the nature of the operations 'filter' and 'reduce' in this pipeline?
Correct Answer:
'filter' is an intermediate lazy operation, while 'reduce' is a terminal eager operation.

Access more questions from this quiz

Continue to Banco do Brasil Agente de Tecnologia Practice Questions - Banco do Brasil Escriturário - Agente de Tecnologia (TI) Exam for more practice questions and the full quiz experience.

Access More Questions