
Two Java Equations
Someone please help me with this ASAP,, I don't understand this at all
1. Solve the expression and find the output of Z = ((X > Y) && (Y < X))? X:Y when int X=5 and Y=10.
5
10
15
20
2. Solve the expression and find the output of Z = ((X > Y)  (Y < X))? X:Y when int X=15 and Y=10.
5
10
15
25

Re: Two Java Equations
Another question I don't understand
If J=true and K=false, what is J&&K?
True
no
False
yes

Re: Two Java Equations
If X > Y then Y < X so X > Y && Y < X are identical. (both expressions are equivalent). If X > Y or Y < X is a tautology (both expressions are equivalent again).
kind regards,
Jos