Decision Structure for Java
<p>I have a problem with the following assignment:</p>

<blockquote>
  <p>Create a program that prompts the user to enter two values: a movie rating and his or her age. Using a decision structure, determine whether the user would be allowed to see the movie in a theater based on the rating and age entered. Finally, display the result of this decision to the user.</p>
</blockquote>

<p>Here is my code, I did the Alt+Shift+F in NetBeans before I posted this: </p>

<pre><code>    /*
     * To change this template, choose Tools | Templates
     * and open the template in the editor.
     */
    package age;

    /**
     *
     * @author Jason
     */
    import java.util.Scanner;

    public class Age {

        public static void main(String[] args) {

            Scanner user_input = new Scanner(System.in);


            String user_age;
            System.out.print("Enter your age: ");
            user_age = user_input.next();

            String mrating;
            System.out.print("Enter the movie rating: ");
            mrating = user_input.next();

        }

    {  
        if ( user_age &lt; 13 + mrating = G);{
        System.out.print( "You are of the right age for this movie");
        }
        else{
        System.out.print(" You are not of correct age for this movie");
        }

        if ( user_age &gt;= 13 + mrating = PG13);{
        System.out.print( "You are of the right age for this movie");
        }
        else{
        System.out.print(" You are not of correct age for this movie");
        }

        if ( user_age &gt;= 17 + mrating = R);{
        System.out.print( "You are of the right age for this movie");
        }
        else{
        System.out.print(" You are not of correct age for this movie");
        } 

    }
}
</code></pre>

<p>If I move my end bracket for Age up to before the <code>if</code> statements start. I can get the display to ask the age and rating of the user then the program ends with no results. If I leave the bracket there, the program errors out completely. I am new to Java and am so confused, I've been working on this for hrs with the book and websites, but I'm starting to get confused. Also, the <code>user_age</code> and <code>mrating</code> are getting an error saying variable is not used.</p>
