Simple Java calculator

后端 未结 10 1885
迷失自我
迷失自我 2020-12-22 02:16

Firstly this is not a homework question. I am practicing my knowledge on java. I figured a good way to do this is to write a simple program without help. Unfortunately, my c

10条回答
  •  無奈伤痛
    2020-12-22 03:15

    You are asking for the user to type in integers, but you put the statement operands.next(); as the input. Try to keep consistent with your variables and user input, so changing it to operands.nextInt() would help.

提交回复
热议问题