Question: Assuming a variable w has been assigned the value 15, what does the following statement do? w == 15 ? x = 2 : x

Assuming a variable w has been assigned the value 15, what does the following statement do? w == 15 ? x = 2 : x = 0;
a. Assigns 15 to w
b. Assigns 2 to x
c. Assigns 0 to x
d. Nothing

Step by Step Solution

3.52 Rating (155 Votes )

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock

b A... View full answer

blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Java Programming Questions!