THIS IS IN JAVA Given x = 1, y = 2, and z = 3, how is the expression evaluated? In the choices, items in parentheses are evaluated first. (x == 5) || (y == 2) && (z == 5)       A. false OR (true AND false) --> false OR false --> false B. false OR (true AND false) --> false OR true --> true C. (false OR true) AND false --> true AND false --> false D. (false OR true) AND false --> true AND false --> true

EBK JAVA PROGRAMMING
9th Edition
ISBN:9781337671385
Author:FARRELL
Publisher:FARRELL
Chapter2: Using Data
Section: Chapter Questions
Problem 19RQ
icon
Related questions
Question

THIS IS IN JAVA

Given x = 1, y = 2, and z = 3, how is the expression evaluated? In the choices, items in parentheses are evaluated first.

<pre><code>(x == 5) || (y == 2) && (z == 5)</code></pre>

 

 

 

A. false OR (true AND false) --> false OR false --> false

B. false OR (true AND false) --> false OR true --> true

C. (false OR true) AND false --> true AND false --> false

D. (false OR true) AND false --> true AND false --> true

Expert Solution
trending now

Trending now

This is a popular solution!

steps

Step by step

Solved in 4 steps

Blurred answer
Similar questions
  • SEE MORE QUESTIONS
Recommended textbooks for you
EBK JAVA PROGRAMMING
EBK JAVA PROGRAMMING
Computer Science
ISBN:
9781337671385
Author:
FARRELL
Publisher:
CENGAGE LEARNING - CONSIGNMENT