1.

What is the output of this program?
import java.util.*; 
public class TreeSet_Example
{
public static void main(String args[])
{
TreeSet object = new TreeSet();
object.add("7");
object.add("0");
object.add("9");
object.add("5");
object.add("6");
System.out.println(object);
}
}

A. Runtime Error
B. Compilation Error
C. [0, 5, 6, 7, 9]
D. [6, 7, 9]
E. [0, 5, 6, 7]
Answer» D. [6, 7, 9]


Discussion

No Comment Found

Related MCQs