Error: ')' expected compiler error
<p>I cannot seem to figure out why i am getting this error</p>

<pre><code>Math.java:6: error: ')' expected
        if(args[1].equalsIgnoreCase("+")
                                        ^
Math.java:11: error: ')' expected
                else if(args[1].equalsIgnoreCase("x")
                                                     ^
Math.java:16: error: ')' expected
                else if(args[1].equalsIgnoreCase("-")
                                                     ^
Math.java:21: error: ')' expected
                else if(args[1].equalsIgnoreCase("/")
                                                     ^
4 errors
</code></pre>

<p>My code is </p>

<pre><code>  class Math 
{
    public static void main(String args[])
    {
        if(args[1].equalsIgnoreCase("+")
        {
        sum = Integer.parseInt(args[0]) + Integer.parseInt(args[2]);
        System.out.println("The answere is : " + sum);
        }
        else if(args[1].equalsIgnoreCase("x")
        {
        sum = Integer.parseInt(args[0]) * Integer.parseInt(args[2]);
        System.out.println("The answere is : " + sum);
        }
        else if(args[1].equalsIgnoreCase("-")
        {
        sum = Integer.parseInt(args[0]) - Integer.parseInt(args[2]);
        System.out.println("The answere is : " + sum);
        }
        else if(args[1].equalsIgnoreCase("/")
        {
        sum = Integer.parseInt(args[0]) / Integer.parseInt(args[2]);
        System.out.println("The answere is : " + sum);
        }
        else
        {
        System.out.println("Something seems to be wrong, please try again.");
        }

    }
}
</code></pre>

<p>When i try to enter the closing parenthesizes where it says they should go, it get more errors. Can anyone give me a brief description of what causes this error. I am simply trying to make a program that with do math, based on arguments entered into the command line when the program is run. </p>

<p>For example if i entered "java Math 1 + 1" It would solve that problem and spit out "The answere is 2."</p>

<p>Any help you guys can offer on this would be greatly appreciated. </p>