

MCQOPTIONS
Saved Bookmarks
1. |
What is the output of below 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 |
B. | Test – 10 |
C. | Runtime Exception |
D. | Compilation Failure |
Answer» B. Test – 10 | |