title: java - error: <identifier> expected
body: <p>I am trying to learn java with this website: <a href="http://www.homeandlearn.co.uk/java/user_input.html" rel="nofollow">http://www.homeandlearn.co.uk/java/user_input.html</a>
  But when I run the code in Ubuntu through the terminal I get these errors:</p>
  
  <pre><code>vonvic@BSW-Computer:~/Java_Applications$ javac StringVariables2.java
  StringVariables2.java:3: error: '{' expected
      public static class main(String[] args) {
                          ^
  StringVariables2.java:8: error: &lt;identifier&gt; expected
          System.out.println("Please enter your first name")
                        ^
  StringVariables2.java:8: error: illegal start of type
          System.out.println("Please enter your first name")
                             ^
  StringVariables2.java:8: error: ';' expected
      System.out.println("Please enter your first name")
                                                        ^
  StringVariables2.java:12: error: &lt;identifier&gt; expected
      System.out.println("Please enter your family name")
                        ^
  StringVariables2.java:12: error: illegal start of type
      System.out.println("Please enter your family name")
                         ^
  StringVariables2.java:12: error: ';' expected
      System.out.println("Please enter your family name")
                                                         ^
  StringVariables2.java:16: error: &lt;identifier&gt; expected
      full_name = first_name +" "+ family_name;
               ^
  StringVariables2.java:18: error: &lt;identifier&gt; expected
      System.out.println("You are" + full_name);
                        ^
  StringVariables2.java:18: error: illegal start of type
      System.out.println("You are" + full_name);
                         ^
  StringVariables2.java:18: error: ')' expected
          System.out.println("You are" + full_name);
                                  ^
  StringVariables2.java:18: error: ';' expected
              System.out.println("You are" + full_name);
                                    ^
  StringVariables2.java:18: error: illegal start of type
          System.out.println("You are" + full_name);
                                              ^
  StringVariables2.java:18: error: &lt;identifier&gt; expected
          System.out.println("You are" + full_name);
                                               ^
  StringVariables2.java:18: error: ';' expected
          System.out.println("You are" + full_name);
                                                ^
  StringVariables2.java:20: error: reached end of file while parsing
  }
   ^
  16 errors
  vonvic@BSW-Computer:~/Java_Applications$ 
  </code></pre>
  
  <p>Here is the code:</p>
  
  <pre><code>import java.util.Scanner;
  
  public class StringVariables2 {
  
      public static class main(String[] args) {
  
      Scanner user_input = new Scanner( System.in );
  
      String first_name;
      System.out.println("Please enter your first name")
      first_name = user_input.next();
  
          String first_name;
          System.out.println("Please enter your family name")
          first_name = user_input.next()
  
          String full_name;
          full_name = first_name +" "+ family_name;
  
          System.out.println("You are" + full_name);
      }
  }
  </code></pre>
  
  <p>I'm using Ubuntu 13.10 Saucy Salamander.</p>
  
  <hr>
  
  <p>Now I get this:</p>
  
  <pre><code>vonvic@BSW-Computer:~/Java_Applications$ javac StringVariables2.java
  
  StringVariables2.java:13: error: variable first_name is already defined in method     main(String[])
      String first_name;
             ^
  StringVariables2.java:18: error: cannot find symbol
      full_name = first_name + " " + family_name;
                                     ^
    symbol:   variable family_name
    location: class StringVariables2
  2 errors
  </code></pre>