Java Reference
In-Depth Information
[
22
]
For a low-cost source of randomness, check out the now-defunct
Lavarand
.
The process used digit-
ized video of 1970s “lava lamps” to provide “hardware-based” randomness. Fun!
[
23
]
Note that an expression consisting entirely of compile-time constants, like
Math.PI \* 2.1e17
, is
also considered to be Strict-FP.
[
24
]
If the set of numbers is in an array or collection (see
Chapter 7
), use a “foreach” loop (see
Java 5
foreach loop
).
[
25
]
Certain values do not work; for example, Ashish Batia reported that this version gets an exception
on the value 8989 (which it does).