When working with a Stream , which of these types can be returned from the collect() terminal

Question:

When working with a Stream, which of these types can be returned from the collect() terminal operator by passing arguments to Collectors.groupingBy()?

A. Only Map>

B. Only Map>

C. Both Map> and Map>

D. Only List

E. Only List

F. Both List and List

Fantastic news! We've Found the answer you've been seeking!

Step by Step Answer:

Question Posted: