0 votes
in JAVA by

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

a) toArray()

b) toList()

c) toSet()

d) toMap()

1 Answer

0 votes
by

Solution: c) toSet()

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

Related questions

0 votes
asked May 4 in JAVA by rahuljain1
0 votes
asked May 5 in JAVA by sharadyadav1986
...