Java Hard Level MCQ Set-1 (1-10) Total = 500
1. What is the Output? public class Test { public static void main ( String [] args ) { int x = 5 ; System . out . println ( x ++ + ++ x ); } } A. 10 B. 11 C. 12 D. 13 Answer: D 2. Which collection maintains insertion order? A. HashSet B. TreeSet C. LinkedHashSet D. EnumSet Answer: C 3. Which keyword prevents inheritance? A. static B. final C. abstract D. volatile Answer: B 4. What is the output? String s1 = "Java" ; String s2 = new String ( "Java" ); System . out . println ( s1 == s2 ); A. true B. false C. Compile Error D. Runtime Error Answer: B 5. Which exception is unchecked? A. IOException B. SQLException C. NullPointerException D. FileNotFoundException Answer: C 6. What is the default value of boolean? A. true B. false C. null D. 0 Answer: B 7. Which interface is implemented by ArrayList? A. Set B. Queue C. List D. Map Answer: C 8. Output? System . out . pr...