Tree set elements order

Report a typo

What will be the result of running the code below?

public static void main(String[] args) {
   TreeSet<Integer> treeSet = new TreeSet<>();

    for (int i = 15; i > 5; i--) {
        treeSet.add(i);
    }
    System.out.println(treeSet);
}
Select one option from the list
___

Create a free account to access the full topic