Resolving “The method must return a result of type int” in Java

后端 未结 9 663
庸人自扰
庸人自扰 2021-01-21 12:37

I\'m very new to Java. Eclipse is giving me the error

The method must return a result of type int

for the following code:



        
9条回答
  •  攒了一身酷
    2021-01-21 13:22

    For your second error, the logic seems to be off a little... there is no return statement in the case where b > a.

提交回复
热议问题