mercredi 26 septembre 2018

Java Error message. unexpected type, required variable, found value

I am doing a debugging exercise for one of my courses. I have found and fixed all but one error in the code. I have to fix this one error:

int input, x; 
if ((input % 2)= 0)  // <- this is the line with the error
    ++input;
else
    --input;

I am getting an error on the input % 2, it is saying it is looking for a variable not a value

Aucun commentaire:

Enregistrer un commentaire