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.

200 Chapter 5 Methods<br />

Math.abs(-2) returns 2<br />

Math.abs(-2.1) returns 2.1<br />

5.10.5 The random Method<br />

You have used the random() method <strong>to</strong> generate a random double value greater than or<br />

equal <strong>to</strong> 0.0 and less than 1.0 (0

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

Saved successfully!

Ooh no, something went wrong!