Which of the following statements are true?

a. (x > 0 && x < 10) is same as ((x > 0) && (x < 10))
b. (x > 0 || x < 10) is same as ((x > 0) || (x < 10))
c. (x > 0 || x < 10 && y < 0) is same as (x > 0 || (x < 10 && y < 0))
d. (x > 0 || x < 10 && y < 0) is same as ((x > 0 || x < 10) && y < 0)

a. (x > 0 && x < 10) is same as ((x > 0) && (x < 10))
b. (x > 0 || x < 10) is same as ((x > 0) || (x < 10))
c. (x > 0 || x < 10 && y < 0) is same as (x > 0 || (x < 10 && y < 0))

In D, && is evaluated before the || operator. So (x > 0 || x < 10 && y < 0) is not same as ((x > 0 || x < 10) && y < 0).

Computer Science & Information Technology

You might also like to view...

In an event-driven simulation of a bank, the departure times of customers are determined by the simulation.

What will be an ideal response?

Computer Science & Information Technology

A _____________ allows multiple lines of text to be displayed.

(a) JTextField (b) JTextArea (c) JTextBox (d) JTextValue

Computer Science & Information Technology