title: Cannot find symbol IllegalArgumentException
body: <p>I have a very simple program that tries to throw an exception. The compiler says it cannot find <code>IllegalArgumentException</code> even though it didm't say anything about that name when I put it in the throw specifier part:</p>
  
  <pre><code>import java.lang.*;
  
  class A
  {
      public A() throws IllegalArgumentException
      {
          if (n &lt;= 0)
              throw IllegalArgumentException("n is less than 0");
      }
  }
  </code></pre>
  
  <p>Here's the error:</p>
  
  <pre><code>Main.java:28: error: cannot find symbol
              throw IllegalArgumentException("n is less than 0");
                    ^
    symbol:   method IllegalArgumentException(String)
    location: class A
  1 error
  </code></pre>
  
  <p>I realize this is very simple (my very first attempt at writing Java). I've tried looking for answers but they haven't helped me to a solution.</p>