What kind of exception is being thrown if Wait(), Pulse() or PulseAll() is called from code that is not within synchronized code?

Ngoc Hue

New member
What kind of exception is being thrown if Wait(), Pulse() or PulseAll() is called from code that is not within synchronized code?
A. System I/O Exception
B. DivideByZero Exception
C. SynchronizationLockException
D. All of the mentioned
 
Answer: c
Explanation: A SynchronizationLockException will be thrown if Wait(), Pulse(), or PulseAll() is called from code that is not within synchronized code, such as a lock block.
 

Tìm kiếm

Back
Top