| Author |
wait/notify
|
enediel Gonza
Greenhorn
Joined: Jun 11, 2005
Posts: 4
|
|
regarding this expression: Runtime error "A call to wait/notify must be within synchronized code. It will throw an error message ..." My question : ?Under any circunstances the compiler detects this problem to produce a compiling error instead of a runtime error? Thanks in advance for the answers
|
 |
Jim Yingst
Wanderer
Sheriff
Joined: Jan 30, 2000
Posts: 18670
|
|
|
No. It's only at runtime that this error is detected.
|
"I'm not back." - Bill Harding, Twister
|
 |
Wensheng Li
Greenhorn
Joined: Jul 08, 2005
Posts: 16
|
|
Yes,it throws an exception at runtime: java.lang.IllegalMonitorStateException: current thread not owner
|
SCWCD 1.4(In progress)<br />SCJP 5.0<br />IBM Certified Solutions Expert for Webshpere Studio, V3.5 (retired)
|
 |
 |
|
|
subject: wait/notify
|
|
|