Open In App

Scala Mutable SortedSet toArray() method

Last Updated : 26 Mar, 2020
Comments
Improve
Suggest changes
Like Article
Like
Report
In Scala mutable collections, toArray() is utilized to return an array consisting of all the elements of the SortedSet.
Method Definition: def toArray: Array[A] Return Type: It returns an array consisting of all the elements of the SortedSet.
Example #1:
Output:
3
22
44
77
Example #2:
Output:
443
451
772

Next Article
Practice Tags :

Similar Reads