What do we know about the variable x if the following method returns true?
public boolean question(int x)
{
return x % 2 == 2;
}
This method can only return false because x % 2 can only produce 0 or 1
- x must be an even number
- x must be an odd number
- x must equal 2
- This code will produce a syntax error when compiled
There are no hints for this question