title: Thread.sleep not compiling
body: <p>I was trying to use <code>Thread.sleep</code> for something. I just put it between some <code>ImageIcon</code> declarations like so:</p>
  
  <pre><code>ImageIcon cheese = new ImageIcon("C:\\ et cetera \\PictureThing.gif");
  Thread.sleep(500);
  ImageIcon cheese2 = new ImageIcon("C:\\ et cetera \\AnotherPictureThing.gif");
  </code></pre>
  
  <p>and I compiled it and ran. </p>
  
  <p>Just to note, don't worry, the above code wasn't the only code, so don't tell me no duh it didn't work. What it actually did was, once I ran it in the command line, it just said something like "error: unreported exception InterruptException, must be caught or declared to be thrown". </p>
  
  <p>What am I doing wrong, and do I need to add something to it to make <code>Thread.sleep</code> work right?</p>