ExamVeda
Login
Home
Collections Framework in java
?

What will be the output of the following Java program?
import java.util.*; 
class Output 
{
    public static void main(String args[]) 
    { 
        TreeSet t = new TreeSet();
        t.add("3");
        t.add("9");
        t.add("1");
        t.add("4");
        t.add("8"); 
        System.out.println(t);
    }
}

Answer & Solution
Correct Answer: Option D
Let's discuss the solution. Join the discussion
Examveda
Question posted by Examveda
Community

Join the Discussion

No comments yet Be the first to discuss this question.