Skip to article frontmatterSkip to article content
Site not loading correctly?

This may be due to an incorrect BASE_URL configuration. See the MyST Documentation for reference.

Things on this page are fragmentary and immature notes/thoughts of the author. Please read with your own judgement!

Reference

import java.util.Iterator;
import java.util.SortedSet;
import java.util.TreeSet;

SortedSet<Integer> set = new TreeSet<Integer>();
set.add(8);
set.add(3);
set.add(20);
set.remove(8);
set.remove(9);
set.add(20);
Iterator<Integer> it = set.iterator();
for(;it.hasNext();){
    System.out.println(it.next()+"\n");
}
System.out.println(set);
3

20

[3, 20]
null