Won't "IllegalMonitorStateException" be here every time, because wait() is not in synchronized block?

http://www.xyzws.com/Javafaq/why-wait-notify-notifyall-must-be-called-inside-a-synchronized-method-block/127