title: Syntax error on token(s), misplaced construct(s) Code Help Needed
body: <p>I use eclipse to help me code &amp; I have been having issues with the error message "Syntax error on token(s), misplaced construct(s)" coming up, I'm not entirely sure what is wrong with my code. </p>
  
  <p>The goal of this code is to write a program where a user enters their name and age and the program checks to see the age is between 0 and 125. If not, the program shows an error code (use Exception Class)</p>
  
  <p>Here is my current code: Errors are showing up in lines 1 and 4 </p>
  
  <pre><code>public class ThreadsUnitProject1 {
      import java.lang.String;
      import java.io.*;
  
      public static void main(String args[]);
  
      class InvalidAgeException extends Exception {
          private static final long serialVersionUID = 1L;
  
          public InvalidAgeException() {
              super("The age you entered is not between 0 and 125");
          }
      }
  
      class QuestionOne extends Thread {
          public void main(String args[]) {
              System.out.println("What is your name?");
  
              BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
              String name;
  
              try {
                  name = br.readLine();
              }
              catch(IOException e) {
                  System.out.println("Error: " + e);
                  System.exit(1);
              }
  
              System.out.println("Hello " + name + ", how old are you?");
  
              String i;
              int age;
  
              try {
                  i = br.readLine();
                  age = Integer.valueOf(i);
              }
              catch(IOException e) {
                  System.out.println("Error: " + e);
                  System.exit(1);
              }
              catch(InvalidAgeException e) {
                  System.out.println("Error: " + e);
                  System.exit(1);
              }
              finally {
                  System.out.println("No errors found.");
              }
          }
      }
  }
  </code></pre>
  
  <p>Thank you thank you thank you for all of your help, I have been coding for awhile, but I'm new to Java. 
  Thanks again! 
  -Kristen </p>