I'm a java beginner, so what's wrong with this code:
switch(keycode) {
case Keyboard.KEY_UP || Keyboard.KEY_DOWN:
}
I gives me the following error message:
bad operand types for binary operator '||'
first type: int
second type: int
switch(keycode)
{
case Keyboard.KEY_UP:
case Keyboard.KEY_DOWN:
// code to run...
break;
}
See The switch Statement
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With