問題文
A pipeline calls stream on a list, then filter, then map, and the method returns without any further call. A log line inside the filter never appears. Why?
選択肢
- The filter stage runs on a background thread that the pipeline starts, so its output is written after the method has already returned to its caller
- The list was empty at that moment, so no element ever reached the predicate that the filter stage holds
- The map stage replaced the filter stage during optimization, because the two stages are merged into one pass over the elements
- No terminal operation was called at all, so the intermediate stages were only described and never run