Scala TreeSet apply() method with example
In Scala TreeSet class, the apply() method is utilized to check if some element is present in the TreeSet or not. Method Definition: def apply(elem: A): Boolean Return Type: It returns true if the given element is present in the TreeSet or else returns false. Example #1: // Scala program of apply()