BPSC TRE – Java Programming & OOP Concepts | Test 2

Questions 26-30 of 50

0% completed (0/50 answered)
Your score 0/50 0 answered
Correct 0 Incorrect 0 Unanswered 50 Accuracy 0%

Question 26

MCQ · Single Correct 1 mark

What is the primary difference between fail-fast and fail-safe iterators in Java Collections?

Answers for question 26

Question 27

MCQ · Single Correct 1 mark

Which data structure is internally utilized by java.util.PriorityQueue to order its elements according to natural order or a Comparator?

Answers for question 27

Question 28

MCQ · Single Correct 1 mark

In Java HashMap, what structural transformation occurs to a hash bucket when the number of entries in that bucket exceeds TREEIFY_THRESHOLD (default 8)?

Answers for question 28

Question 29

MCQ · Single Correct 1 mark

What contract must be maintained between equals() and hashCode() methods in Java for objects used as keys in Hash-based collections?

Answers for question 29

Question 30

MCQ · Single Correct 1 mark

Which Java keyword is used to declare that a variable's value will be read from and written to main memory rather than thread-local CPU caches?

Answers for question 30
Scroll to Top