Scala Mutable SortedSet mkString() method Last Updated : 26 Mar, 2020 Summarize Comments Improve Suggest changes Share Like Article Like Report In Scala mutable collections, mkString() method is utilized to display all elements of the SortedSet in a string. Method Definition: def mkString: String Return Type: It returns a string containing all the element of the SortedSet. Example #1: Scala // Scala program of mkString() // method import scala.collection.mutable.SortedSet // Creating object object GfG { // Main method def main(args:Array[String]) { // Creating a SortedSet val s1 = SortedSet(121, 2242, 331, 400) // Applying mkString method val result = s1.mkString // Display output println(result) } } Output: 1213314002242 Example #2: Scala // Scala program of mkString() // method import scala.collection.mutable.SortedSet // Creating object object GfG { // Main method def main(args:Array[String]) { // Creating a SortedSet val s1 = SortedSet("Geeks", "Will", "Rule") // Applying mkString method val result = s1.mkString // Display output println(result) } } Output: GeeksRuleWill Comment More infoAdvertise with us Next Article Scala Mutable SortedSet -() method S Shivam_k Follow Improve Article Tags : Scala Scala Scala-Method Scala mutable-sortedset Similar Reads Scala Mutable SortedSet min() method In Scala mutable collections, min() method is utilized to find the smallest element of all the elements in the stated list. Method Definition: def min: A Return Type: It returns the smallest of all the elements in the stated list. Example #1: Scala // Scala program of min() // method import scala.co 1 min read Scala Mutable SortedSet -() method In Scala mutable collections, SortedSet -() method is utilized to creates a new SortedSet with a given element removed from the SortedSet. Method Definition: def -(elem: A): SortedSet[A] Return Type: It returns a new SortedSet with a given element removed from the SortedSet. Example #1: Scala // Sca 1 min read Scala Mutable SortedSet +() method In Scala mutable collections, +() method is utilized to create a new SortedSet with an additional element unless the element is already present. Method Definition: def +(elem: A): SortedSet[A] Return Type: It returns a new SortedSet with an additional element unless the element is already present. E 1 min read Scala Mutable SortedSet map() method In Scala mutable collections, map() method is utilized to build a new SortedSet by applying a function to all elements of this SortedSet. Method Definition: def map[B](f: (A) => B): mutable.SortedSet[B] Return Type: It returns a new SortedSet containing all the elements after applying the given f 1 min read Scala mutable SortedSet &~() method In Scala mutable collection &~() method is utilized to create a new SortedSet consisting of elements after the difference between two given SortedSets. Method Definition: def &~(that: SortedSet[A]): SortedSet[A] Return Type: It returns a TreeSet consisting of elements after the difference be 1 min read Scala mutable SortedSet &() method In Scala mutable collection, &() method is utilized to create a new SortedSet consisting of all elements that are present in both the given SortedSets. Method Definition: def &(that: SortedSet[A]): SortedSet[A] Return Type: It returns a new SortedSet consisting of all elements that are prese 1 min read Like