

MCQOPTIONS
Saved Bookmarks
This section includes 58 Mcqs, each offering curated multiple-choice questions to sharpen your Java knowledge and support exam preparation. Choose a topic below to get started.
51. |
An algorithm is a _________ set of precise instructions for performing computation. |
A. | Infinite |
B. | Finite |
C. | Constant |
D. | None of the mentioned |
Answer» C. Constant | |
52. |
The operation of processing each element in the list is known as _________ |
A. | Sorting |
B. | Merging |
C. | Inserting |
D. | Traversal |
Answer» E. | |
53. |
The complexity of Bubble sort algorithm is _________ |
A. | O(n) |
B. | O(log n) |
C. | O(n²) |
D. | O(n log n) |
Answer» D. O(n log n) | |
54. |
Out of the following which property algorithms does not share? |
A. | Input |
B. | Finiteness |
C. | Generality |
D. | Constancy |
Answer» E. | |
55. |
__________ comparisons required to sort the list 1, 2, 3…….n using insertion sort. |
A. | (n² + n + 2) / 2 |
B. | (n³ + n – 2) / 2 |
C. | (n² + n – 2) / 2 |
D. | (n² – n – 2) / 2 |
Answer» D. (n² – n – 2) / 2 | |
56. |
2 8 5 1 |
A. | 1 5 8 2 |
B. | 2 |
C. | 2 1 8 5 |
Answer» C. 2 1 8 5 | |
57. |
Which of these methods can convert an object into a List? |
A. | SetList() |
B. | ConvertList() |
C. | singletonList() |
D. | CopyList() |
Answer» D. CopyList() | |
58. |
Which of these is an incorrect form of using method max() to obtain a maximum element? |
A. | max(Collection c) |
B. | max(Collection c, Comparator comp) |
C. | max(Comparator comp) |
D. | max(List c) |
Answer» D. max(List c) | |