Or operand with int in if statement

前端 未结 12 2077
傲寒
傲寒 2021-01-25 07:45

My problem is that program is not reading codes as i intended \"he\" would.

I have

if (hero.getPos() == (6 | 11 | 16)) {
    move = new Object[] {\"Up\",         


        
12条回答
  •  死守一世寂寞
    2021-01-25 08:13

    boolean theyAretheSame = num1 == num2 ? (num1 == num3 ? true:false):false;
    

    I must admit I haven't checked this but the logic looks correct.

提交回复
热议问题