Method Definition: def toString(): String Return Type: It returns a string consisting of all the elements of the set.
Set(5, 1, 2, 3, 4)
Set(1, 41, 12, 72, 43, 23)