For some reason, I'm getting an error message when I try to compile the following program. Its a simple calculator program that take three arguments from the command line (two integers and an operator) to preform math problems.



class Calculator {
public static void main(String[] arguments) {
int answer = 0;
int firstNumber = Integer.parseInt(arguments[0]);
int secondNumber = Integer.parseInt(arguments[2]);

if (arguments[1].equals(+)) {
answer = firstNumber + secondNumber;
System.out.print(answer);
}
else if (arguments[1].equals(-)) {
answer = firstNumber - secondNumber;
System.out.print(answer);
}
else if (arguments[1].equals(*)) {
answer = firstNumber * secondNumber;
System.out.print(answer);
}
else if (arguments[1].equals(x)) {
answer = firstNumber * secondNumber;
System.out.print(answer);
}
else if (arguments[1].equals(/)) {
answer = firstNumber / secondNumber;
System.out.print(answer);
}
else {
System.out.println("That is not a valid entry. Please try again.");
System.out.print("You entered " + firstNumber);
System.out.print(arguments[1]);
System.out.print(secondNumber);
}
}
}

This is the error message:
Calculator.java:7: illegal start of expression
if (arguments[1].equals(+)) {
^
Calculator.java:33: ')' expected
}
^

Thanks ahead of Time!!!