Main.java Source code

Java tutorial

Introduction

Here is the source code for Main.java

Source

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

public class Main {
    public static void main(String[] args) {

        TreeSet<Integer> treeadd = new TreeSet<Integer>();

        treeadd.add(12);
        treeadd.add(11);
        treeadd.add(16);
        treeadd.add(15);

        // getting ceiling value for 13
        System.out.println("Ceiling value for 13: " + treeadd.ceiling(13));
    }
}