I am new to java, i am trying to make a little calculator that takes the input of two numbers and an operator. This data is then taken into an if statement to calculate the answer. Then output into the console. I am having a problem though because with the:
operator = Calc.next();
Because i thought that the above line of code was correct for inputting a string but it doesn't work, whatever the numbers input to the calculator are, the answer seems to be output as zero.
Please take the code from the pastebin link and look at it because i'm not sure what is going wrong. I would appreciate someone letting me know where i went wrong.
Thanks