Q20
How can you prevent multiple threads from accessing a critical section of code simultaneously in Java?
A.
By using the wait() method
B.
By using the start() method multiple times
C.
By creating more threads to access the critical section
D.
By using synchronized blocks or methods
AnswerAnswer: Option D
Solution
Answer: Option D
No explanation is given for this question Let's Discuss on Board