if else statement error as it says its not a statement

后端 未结 5 1645
渐次进展
渐次进展 2021-01-29 14:05

I am new to java programming and I am trying to program, however, I am getting an error in my If Else statement. Can someone please look into it and help me.

 pu         


        
5条回答
  •  自闭症患者
    2021-01-29 14:52

    In an if-else block, the else statement does not have a condition. If you would like to add a condition, change it to an if-else if statement.

    else if (value < mYelloStep)
        return effort.WALKING;
    else
        return null;
    

提交回复
热议问题