File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1+ package TreeSet ;
2+
3+ import java .util .TreeSet ;
4+
5+ public class TreeSetDemo11 {
6+ public static void main (String [] args ) {
7+ TreeSet <Float > ts = new TreeSet <>();
8+ ts .add (10.58f );
9+ ts .add (20.78f );
10+ ts .add (30.65f );
11+ ts .add (40.78f );
12+ ts .add (50.98f );
13+ ts .add (60.65f );
14+ System .out .println (ts .tailSet (40.78f , false ));
15+ System .out .println (ts .tailSet (30.65f , true ));
16+ }
17+ }
Original file line number Diff line number Diff line change 1+ package TreeSet ;
2+
3+ import java .util .TreeSet ;
4+
5+ public class TreeSetDemo12 {
6+ public static void main (String [] args ) {
7+ TreeSet <Float > ts = new TreeSet <>();
8+ ts .add (10.58f );
9+ ts .add (20.78f );
10+ ts .add (30.65f );
11+ ts .add (40.78f );
12+ ts .add (50.98f );
13+ ts .add (60.65f );
14+ System .out .println (ts .headSet (40.78f , false ));
15+ System .out .println (ts .headSet (40.78f , true ));
16+ }
17+ }
You can’t perform that action at this time.
0 commit comments