title: Java: custom-exception-error
body: <pre><code>$ javac TestExceptions.java 
  TestExceptions.java:11: cannot find symbol
  symbol  : class test
  location: class TestExceptions
              throw new TestExceptions.test("If you see me, exceptions work!");
                                      ^
  1 error
  </code></pre>
  
  <p><strong>Code</strong></p>
  
  <pre><code>import java.util.*;
  import java.io.*;
  
  public class TestExceptions {
      static void test(String message) throws java.lang.Error{
          System.out.println(message);
      }   
  
      public static void main(String[] args){
          try {
               // Why does it not access TestExceptions.test-method in the class?
              throw new TestExceptions.test("If you see me, exceptions work!");
          }catch(java.lang.Error a){
              System.out.println("Working Status: " + a.getMessage() );
          }
      }
  }
  </code></pre>