19.09.2015 Views

Prentice.Hall.Introduction.to.Java.Programming,.Brief.Version.9th.(2014).[sharethefiles.com]

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

3.21 Assume that x and y are int type. Which of the following are legal <strong>Java</strong> expressions?<br />

x > y > 0<br />

x = y && y<br />

x /= y<br />

x or y<br />

x and y<br />

(x != 0) || (x = 0)<br />

3.22 Suppose that x is 1. What is x after the evaluation of the following expression?<br />

a. (x >= 1) && (x++ > 1)<br />

b. (x > 1) && (x++ > 1)<br />

3.12 Case Study: Determining Leap Year 105<br />

3.23 What is the value of the expression ch >= 'A' && ch

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!