title: Java What is wrong with this code?
body: <pre><code>class Ages {
      public static void main (String args[]){
          int age = 3;
          Scanner agescan = new Scanner(System.in);
          System.out.println("Hello. Enter your age here: ");
          age = agescan.nextInt();
      }           
  }
  </code></pre>
  
  <p>I'm trying to create something that says a certain thing depending on your age. I haven'y yet added the nested if and else stuff because this won't run.. WHY?</p>
  
  <p>This is my error message: </p>
  
  <pre><code>Exception in thread "main" java.lang.NoClassDefFoundError: Age Caused by:
      java.lang.ClassNotFoundException: Age at
      java.net.URLClassLoader$1.run(URLClassLoader.java:202) at
      java.security.AccessController.doPrivileged(Native Method) at
      java.net.URLClassLoader.findClass(URLClassLoader.java:190) at
      java.lang.ClassLoader.loadClass(ClassLoader.java:306) at
      sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:301) at
      java.lang.ClassLoader.loadClass(ClassLoader.java:247)
  </code></pre>