logo CodeStepByStep logo

booleanExpressions

Language/Type: Java boolean

Write the result of each expression as either true or false, given the following variables.

int x = 12;
int y = 7;
int z = 28;
String s = "mid term";
x < 14
!(x % 2 < 1)
x < y || x < z
z / x < x / y * x
s.length() == y
s.toUpperCase().equals("MID TERM")
!s.equals("mid term") || x * y != z
s.substring(z / x).length() > y

You must log in before you can solve this problem.

Log In

Need help?

Stuck on an exercise? Contact your TA or instructor.

If something seems wrong with our site, please

Is there a problem? Contact us.