1. Rewrite each condition below in valid Java syntax (give a boolean expression): a. x > y > z b. x and y are both less than 0 c. neither x nor y is less than 0 d. x is equal to y but not equal to z

Respuesta :

nooray

Answer:

Here are Boolean expressions in Java syntax.

Step-by-step explanation:

For each part:

    a) (x > y && y > z)

    b) x == y && x < 0, or x < 0 && y < 0, or x == y && y < 0 (which is essentially the first example)

    c) (x == y && x >= 0), or (x >= 0 && y >= 0), or (x == y && y >= 0) (for the first and third, once the first condition establishes that x is equal to y, if either x or y is greater than or equal to 0, then they are both not less than 0)

    d) (x == y && x != z), or (x == y && y != z)