title: Why does this method throw an IllegalMonitorStateException?
body: <pre><code>  public static synchronized void main(String[] args) throws InterruptedException {
      Thread t = new Thread();
      t.start();
      System.out.print("X");
      t.wait(10000);
      System.out.print("Y");
    }
  </code></pre>
  
  <ul>
  <li>What is the problem with this method? </li>
  <li>How can I avoid such problems from now on?</li>
  </ul>