0 votes
in JAVA by

Which method is used to convert a stream of objects into a map in Java?

a) toArray()

b) toList()

c) toSet()

d) toMap()

1 Answer

0 votes
by
Solution: d) toMap()

Explanation: The toMap() method is used to convert a stream of objects into a map in Java.
...