title: Java Program in course not working
body: <p>I have been following the java course <a href="http://www.programmingbydoing.com" rel="nofollow">http://www.programmingbydoing.com</a> and I am stuck on one of the assignments could i get some help my code is here: <a href="http://pastebin.com/raw.php?i=Si49CbN9" rel="nofollow">http://pastebin.com/raw.php?i=Si49CbN9</a></p>
  
  <pre><code>public static void main( String[] args )
  {
      Scanner keyboard = new Scanner ( System.in );
      int age;
      String name;
  
      System.out.println( "What is your name" );
      name = keyboard.next();
  
      System.out.println( "So " + name + "how old are you? ")
      age = keyboard.nextInt();
  
      if ( age &lt; 16 );
      {
          System.out.println( "You cant drive");
      }
  
      else ( age &lt;= 17 );
      {
          System.out.println( "You can drive, but not vote." );
      }
  
      else ( age &lt;= 24 );
      {
          System.out.println( "You can vote but not rent a car" );
      }
  
      else if
      {
          System.out.println( "You can do pretty much anything" );
      }
  }
  </code></pre>
  
  <p>The assignments is:
  Using if statements, else if, and else statements, make a program which displays a different message depending on the age given.</p>
  
  <p>age message
  less than 16    "You can't drive."
  16 to 17    "You can drive but not vote."
  18 to 24    "You can vote but not rent a car."
  25 or older "You can do pretty much anything."</p>
  
  <p>Note that unlike the original "How Old Are You" assignment, this program must only display exactly one message for a given age and not multiple messages.</p>