Описание тега illegalmonitorstateexcep

An exception thrown in Java to indicate that an object called notify(), notifyAll(), or wait() without the current thread owning its monitor.

An exception thrown in Java to indicate that an object called notify(), notifyAll(), or wait() without the current thread owning its monitor.

The object in question must be the target of a synchronized statement so that the current thread can obtain a lock on the monitor associated with it. If the thread does not lock on the object's monitor yet the object invokes the notify, notifyAll, or wait method, an IllegalMonitorStateException will be thrown.

See also:

Java Language Specification references

Java Tutorials

Related tags: