[Solved] Error using && operator [closed]


Maybe right logic is:

if(xposition == ( (oposition-1) && (oposition != 12 && oposition != 8 && oposition != 4) ) )

If you have a lot of numbers:

int[] numbers = { 
    12, 8, 4, 13, 2, 7
};
boolean validation = true;
for (int i : numbers) {
    if (oposition == i) {
        validation = false;
        break;
    }
}

2

solved Error using && operator [closed]