Assuming a variable w has been assigned the value 15, what does the following statement do? w

Question:

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

Fantastic news! We've Found the answer you've been seeking!

Step by Step Answer:

Related Book For  book-img-for-question

Java Programming

ISBN: 978-1337397070

9th edition

Authors: Joyce Farrell

Question Posted: