TreeSet<String> sortedSet = new TreeSet<String>(); Collections.addAll(sortedSet, "a b c d e f g h" .split(" "));
Iterator<String> it = sortedSet.iterator(); for(int i = 0; i <= 6; i++) { if(i == 3) low = it.next(); if(i == 6) high = it.next(); else it.next(); } print(low); print(high);
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)