The reason for the symbol issue is that your variables number1 and number2 are declared inside the try clause so you will not be able to reach them outside.

Just move the last two lines into the...