import java.util.TreeSet;
public class Main {
public static void main(String[] args) {
TreeSet tSet = new TreeSet();
tSet.add("1");
tSet.add("2");
tSet.add("3");
tSet.add("4");
tSet.add("5");
boolean blnExists = tSet.contains("3");
System.out.println("3 exists in TreeSet ? : " + blnExists);
}
}