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?
Select the one correct answer.
wait()
method is called while the current thread does not hold the lock of the object.(c)
An IllegalMonitorStateException will be thrown if the wait()
method is called when the current thread does not hold the lock of the object.