VOOZH about

URL: https://www.geeksforgeeks.org/scala/scala-set-toseq-method-with-example/

⇱ Scala Set toSeq() method with example - GeeksforGeeks


  • Courses
  • Tutorials
  • Interview Prep

Scala Set toSeq() method with example

Last Updated : 18 Oct, 2019
The toSeq() method is utilized to return a seq consisting of all the elements of the set.
Method Definition: def toSeq: Seq[A] Return Type: It returns a seq consisting of all the elements of the set.
Example #1:
Output:
5
1
6
2
3
4
Example #2:
Output:
1
41
12
72
43
23
Comment

Explore