Q62
What will be the output of the following Java code snippet? public class Test public static void main(String[] args) Set s = new HashSet(); s.add(new Long(10)); s.add(new Integer(10)); for(Object object : s) System.out.println("test - "+object);
A.
Test - 10
Test - 10
AnswerTest - 10
B.
Test - 10
C.
Runtime Exception
D.
Compilation Failure
Answer: Option A
Solution
Answer: Option A
No explanation is given for this question Let's Discuss on Board