Write an expression that evaluates to true if the integer variable x contains an even value, and false if it contains an odd value.

Write an expression that evaluates to true if the integer variable x contains an even value, and false if it contains an odd value.

LANGUAGE: JAVA

CHALLENGE:

Write an expression that evaluates to true if the integer variable x contains an even value, and false if it contains an odd value.

SOLUTION:

(x%2 == 0)

Add comment