![]() |
VOOZH | about |
TreeSet class, the clone() method is used to create a copy of the given TreeSet.
Method Definition: def clone(): Queue[A] Return Type: It return a new TreeSet which is a copy of the given TreeSet.Example #1:
TreeSet(1, 2, 3, 4, 5) Clone of the TreeSet: TreeSet(1, 2, 3, 4, 5)
TreeSet(a, e, i, o, u) Clone of the TreeSet: TreeSet(a, e, i, o, u)