Java says "bad operand types for binary operator '&&' " when I do
Can strings not be used with the && operator? I would think that conditional operators would still work with strings? If not, should I just use integers to represent the directions?
1 2 3 4 | if (Xdirection = "right" && Ydirection = "down" ) { setLocation((getX() + ( int )Xmomentum), (getY() + ( int )Ymomentum)); } |