Home / Programming MCQs / JAVA MCQs / Question
P
Q. What will be the output of the following code
import java.util.Collection; import java.util.HashSet; import java.util.Set; import java.util.TreeSet; public class SortSet { public static void main(String…a) { Collection<Integer> collection = new HashSet<Integer>(); collection.add(3); collection.add(1); collection.add(2); { Set<Integer> treeSet=new TreeSet<Integer>(collection); System.out.println(treeSet); } } }
No solution found for this question.
Add Solution and get +2 points.
You must be Logged in to update hint/solution
Which HTTP Request method is non-idempotent?
What part is used to compile, debug and execute java programs?
When a class is declared as final , then ____.
The data or variables, defined within a class are called _______ variables.
What is the output of the below Java program?
What is the range of the int data type?
Exception Handling is a mechanism to handle runtime errors
Can two threads on same ConcurrentHashMap object access it concurrently
Choose correct ranges for Decimal, Octal and Hexadecimal numbers in Java?
Discusssion
Login to discuss.