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.

Related questions

0 votes
asked Apr 30 in JAVA by john ganales
0 votes
asked May 5 in JAVA by sharadyadav1986
...