フリー問題

Java SE 21 Developer Professional のフリー問題 16 / 20 問目

問題文

A grouping must collect one field of each element instead of the whole element. Which downstream collector expresses that?

選択肢

  1. flatMapping, because it is the only downstream collector that can change the type of the elements that reach the collector placed after it in the chain of collectors.
  2. A map step placed before the grouping in the pipeline itself, and an already converted value then reaches whichever classifier is used.
  3. filtering, because it also takes a function and applies it to each element of the group before handing the result over to the collector that comes after it in the chain.
  4. mapping, which applies a function to each element and then passes the results on to another downstream collector.

解答・解説を確認するには

正解と解説の確認、回答の記録には無料登録が必要です。登録すると演習モードでフリー問題に回答し、正誤と解説をその場で確認できます。