# Thread: Two Java Equations

1. Senior Member Join Date
Jan 2012
Posts
147
Rep Power
0

## 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  Reply With Quote

2. Senior Member Join Date
Jan 2012
Posts
147
Rep Power
0

## Re: Two Java Equations

Another question I don't understand

If J=true and K=false, what is J&&K?
True
no
False
yes  Reply With Quote

3. ## 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  Reply With Quote

#### Posting Permissions

• You may not post new threads
• You may not post replies
• You may not post attachments
• You may not edit your posts
•