Call to wait() inside the run() method of a Thread
<p>I'm curious about why this doesn't work? I'm getting an IllegalMonitorStateException. This is the run method for a Runnable that has been encapsulated in a Thread and started. </p>

<pre><code>public void run()
{
    while(true)
    {
        System.out.println("Hello World"); 

        synchronized(Thread.currentThread())
        {
            try{
                wait();     
            }  
            catch (InterruptedException e){}
        }
    }
}
</code></pre>
