TreeSet Flashcards

1
Q

Declaring a TreeSet

A

TreeSet treeset = new TreeSet();

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
2
Q

Adding element to TreeSet

A

treeset.add(“Element”);

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
3
Q

Covert a HashSet to TreeSet

A

Set treeset = new TreeSet(hashset);

How well did you know this?
1
Not at all
2
3
4
5
Perfectly