Simple java calculator always outputs 0 : <p>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:</p>

<p>operator = Calc.next();</p>

<p>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.</p>

<p>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. </p>

<p><a href="http://pastebin.com/B5PjkXwX" rel="nofollow">http://pastebin.com/B5PjkXwX</a></p>

<p>Thanks</p>
