

MCQOPTIONS
Saved Bookmarks
This section includes 40 Mcqs, each offering curated multiple-choice questions to sharpen your Java Programming knowledge and support exam preparation. Choose a topic below to get started.
1. |
What is the output of below snippet?
|
A. | {0=null, 1=null, 2=null, 3=null, 4=null} |
B. | Runtime Error |
C. | Compilation Error |
D. | {3=null, 0=null, 2=null, 1=null, 4=null} |
E. | None of these |
Answer» B. Runtime Error | |
2. |
What is the output of this program?
|
A. | Runtime Error |
B. | Compilation Error |
C. | [0, 5, 6, 7, 9] |
D. | [6, 7, 9] |
E. | [0, 5, 6, 7] |
Answer» D. [6, 7, 9] | |
3. |
What is the output of this program?
|
A. | 6, 3 |
B. | 5 |
C. | 7 |
D. | 9 |
E. | None of these |
Answer» E. None of these | |
4. |
What is the output of this program?
|
A. | 9, 12, 21 |
B. | I, L, U |
C. | [9, 12, 21] |
D. | [I=9, L=12, U=21] |
E. | None of these |
Answer» E. None of these | |
5. |
What is the output of this program?
|
A. | 9 |
B. | 12 |
C. | 21 |
D. | [I, L, U] |
E. | None of these |
Answer» C. 21 | |
6. |
What is the output of this program?
|
A. | {D=4, E=5, F=6} |
B. | [D, E, F] |
C. | [D, E, F] 3 |
D. | [D=4, E=5, F=6] |
E. | None of these |
Answer» C. [D, E, F] 3 | |
7. |
What is the output of this program?
|
A. | {D=4, E=5, F=6} |
B. | {D, E, F} |
C. | {E=5, F=6} |
D. | Runtime Error |
E. | Compilation Error |
Answer» B. {D, E, F} | |
8. |
What is the output of this program?
|
A. | True |
B. | U |
C. | L |
D. | False |
E. | None of these |
Answer» B. U | |
9. |
What is the output of this program?
|
A. | [PQ, UV, SR] |
B. | [PQ, UV] |
C. | [UV, SR] |
D. | [23, 46, 25] |
E. | None of these |
Answer» B. [PQ, UV] | |
10. |
What is the output of this program?
|
A. | {R=18, Q=21} |
B. | {Q=21, P=12} |
C. | {R=18, P=12} |
D. | {R=18, Q=21, P=12} |
E. | {P=12, R=18} |
Answer» E. {P=12, R=18} | |
11. |
What is the output of this program?
|
A. | {F=60, D=30, E=70} |
B. | {D=30, E=70} |
C. | {F=60, D=30} |
D. | {D=30, E=70, F=60} |
E. | None of these |
Answer» D. {D=30, E=70, F=60} | |
12. |
What is the output of this program?
|
A. | 4 |
B. | 3 |
C. | 2 |
D. | 1 |
Answer» F. | |
13. |
What is the output of this program?
|
A. | {0, 1, 3, 4, 5} |
B. | {0, 1, 3, 4} |
C. | {1, 3, 4, 5} |
D. | {0, 1, 3, 4, 5, 6} |
E. | None of these |
Answer» B. {0, 1, 3, 4} | |
14. |
What is the output of this program?
|
A. | {3, 4, 5} |
B. | {4, 5, 6} |
C. | {4, 5} |
D. | {3, 4, 5, 6} |
E. | None of these |
Answer» E. None of these | |
15. |
What is the output of this program?
|
A. | Any Garbage Value |
B. | Prints Present Time & Date |
C. | Runtime Error |
D. | Prints Present Date |
E. | None of these |
Answer» C. Runtime Error | |
16. |
What is the output of this program?
|
A. | 6 |
B. | 10 |
C. | True |
D. | False |
E. | None of these |
Answer» E. None of these | |
17. |
What is the output of this program?
|
A. | 6 60 |
B. | 60 6 |
C. | 6 64 |
D. | 64 6 |
E. | None of these |
Answer» D. 64 6 | |
18. |
What is the output of this program?
|
A. | 56885 |
B. | 678867 |
C. | 328832 |
D. | 78883 |
E. | 68883 |
Answer» E. 68883 | |
19. |
What is the output of this program?
|
A. | {0, 1, 3, 5} |
B. | {0, 1, 2, 5} |
C. | {0, 1, 2, 3, 5} |
D. | {0, 1, 2, 3, 4, 5} |
E. | None of these |
Answer» D. {0, 1, 2, 3, 4, 5} | |
20. |
What is the output of this program?
|
A. | 10 9 6 11 |
B. | 10 9 6 |
C. | 6 9 10 11 |
D. | 11 10 9 6 |
E. | None of these |
Answer» D. 11 10 9 6 | |
21. |
What is the output of this program?
|
A. | 2 7 9 3 |
B. | 3 9 7 2 |
C. | 2 3 7 9 |
D. | 7 9 3 2 |
E. | None of these |
Answer» B. 3 9 7 2 | |
22. |
What is the output of this program?
|
A. | Compilation Error |
B. | Runtime Error |
C. | EMPTY |
D. | empty |
E. | None of these |
Answer» B. Runtime Error | |
23. |
What is the output of this program?
|
A. | 3 11 13 23 |
B. | 13 23 3 11 |
C. | 3 11 13 |
D. | 13 11 3 |
E. | 23 13 11 3 |
Answer» B. 13 23 3 11 | |
24. |
What is the output of this program?
|
A. | 22 28 25 21 |
B. | 21 25 28 22 |
C. | 28 25 22 21 |
D. | 21 22 25 28 |
E. | None of these |
Answer» C. 28 25 22 21 | |
25. |
What is the output of this program?
|
A. | 12 10 15 |
B. | 10 3 15 12 |
C. | 3 15 12 10 |
D. | 3 10 12 15 |
E. | None of these |
Answer» B. 10 3 15 12 | |
26. |
What is the output of this program?
|
A. | [20, 60] |
B. | [20, 12, 60] |
C. | [20, 12] |
D. | [12, 60] |
E. | None of these |
Answer» B. [20, 12, 60] | |
27. |
What is the output of this program?
|
A. | True |
B. | False |
C. | 0 |
D. | 1 |
E. | None of these |
Answer» B. False | |
28. |
What is the output of this program?
|
A. | [10, 20, 60, 80] |
B. | [10, 20, 60] 4 |
C. | [10, 20, 60] |
D. | [20, 60, 80] |
E. | [10, 80, 20, 60] |
Answer» F. | |
29. |
What is the output of this program?
|
A. | 3 |
B. | 6 |
C. | 9 |
D. | 7 |
E. | None of these |
Answer» C. 9 | |
30. |
What is the output of this program?
|
A. | [U, I, L] |
B. | [I, L, U] 3 |
C. | [I, L, U] |
D. | [U, I, L] 3 |
E. | None of these |
Answer» E. None of these | |
31. |
What is the output of this program?
|
A. | [I, L, U] |
B. | [I, L] |
C. | [L, U] |
D. | [I, U] |
E. | None of these |
Answer» D. [I, U] | |
32. |
What is the output of this program?
|
A. | [L] |
B. | [L, O] |
C. | [L, O, V] |
D. | [L, O, V, E] |
E. | None of these |
Answer» E. None of these | |
33. |
What is the output of this program?
|
A. | 0 |
B. | 1 |
C. | 2 |
D. | 3 |
E. | None of these |
Answer» E. None of these | |
34. |
What is the output of this program?
|
A. | 3 |
B. | 2 |
C. | 6 |
D. | 0 |
E. | Any Garbage Value |
Answer» B. 2 | |
35. |
What is the output of this program?
|
A. | Y |
B. | O |
C. | U |
D. | 3 |
E. | None of these |
Answer» E. None of these | |
36. |
What is the output of this program?
|
A. | [L, O] |
B. | [O] |
C. | [L, O, V, E] |
D. | [L, O, V] |
E. | None of these |
Answer» D. [L, O, V] | |
37. |
What is the output of this program?
|
A. | 25 28 52 31 |
B. | 55 31 28 25 |
C. | 31 55 28 25 |
D. | 28 25 55 31 |
E. | None of these |
Answer» B. 55 31 28 25 | |
38. |
Which of these is the interface of legacy is implemented by Hashtable and Dictionary classes? |
A. | Hashtable |
B. | HashMap |
C. | Enumeration |
D. | Map |
E. | None of these |
Answer» E. None of these | |
39. |
Which of this interface is not a part of Java s collection framework? |
A. | SortedMap |
B. | List |
C. | SortedList |
D. | Set |
E. | None of these |
Answer» D. Set | |
40. |
Which of these classes is not part of Java s collection framework? |
A. | Stack |
B. | Queue |
C. | Array |
D. | Maps |
E. | None of these |
Answer» E. None of these | |