小编ser*_*ner的帖子

OR组合器在Java IF语句中不起作用

if (key != (VK_RIGHT || VK_DOWN)) //in this line bluej saying that's not correctly written. i want when the user is not pressing the down or up arrow it makes the error sound.
{
playSound("error");
}
Run Code Online (Sandbox Code Playgroud)

我想当用户没有按下向下或向上箭头时,它会使错误发出声音.但是在bluej中它向我显示了|| 不管用.

java if-statement

1
推荐指数
1
解决办法
65
查看次数

标签 统计

if-statement ×1

java ×1