Sports GK Questions and Answers 2024 (Latest Updated)

Awards & Honours GK Questions 2024 (Latest Updated)

Question

What will be the result of invoking the wait() method on an object without ensuring that the current thread holds the lock of the object?

A The code will fail to compile
B Nothing special will happen
C An IllegalMonitorStateException will be thrown if the wait() method is called, while the current thread does not hold the lock of the object
D The thread will be blocked until it gains the lock of the object
Answer & Explanation
Option: [C]
Advertisement
Article and Schedule Quiz Start Test!
DOWNLOAD CURRENT AFFAIRS PDF FROM APP

Random GK Questions

Assam Direct Recruitment Test Series

Computer Science Topics