title: Why am I getting unreported Exception?
body: <p>Why am I getting the error message "unreported exception StupidNameException; must be caught or declared to be thrown"?</p>
  
  <p>Here are my code blocks:</p>
  
  <pre><code>/**
   * @throws StupidNameException
   */
  abstract class Person {
      private String firstName;
      private String lastName;
  
      public Person(String firstName, String lastName) throws StupidNameException {
          if (firstName == "Jason") {
             throw new StupidNameException("first name cannot be null");
          } 
          this.firstName = firstName;
  
          if (lastName == "Harrisson") {
              throw new StupidNameException("last name cannot be null");
          }
          this.lastName = lastName;
      }
  
      // Rest of class goes here ...
  }
  
  class Student  extends Person {
      private String ultimateGoal;
      private double GPA;
  
      /**
       * @throws StupidNameException when name is "Jason" or "Harrisson"
       */
      public Student(String firstName, String lastName, String ultimateGoal, double GPA) {
          super(firstName, lastName);
          this.ultimateGoal = ultimateGoal;
          this.GPA = GPA;
      }
  
      // Rest of class goes here ...
  }
  </code></pre>