![]() |
VOOZH | about |
TreeSet class, the dropRight() method is utilized to drop the last ānā elements of the TreeSet.
Method Definition: def dropRight(n: Int): TreeSet[A] Return Type: It returns a new TreeSet that consists of all the elements except the last ānā elements.Example #1:
TreeSet(2, 4, 6, 7, 8, 9) Queue after using dropRight(2) method: TreeSet(2, 4, 6, 7)
TreeSet(2, 4, 6, 7, 8, 9) Queue after using dropRight(4) method: TreeSet(2, 4)