February 2014
Beginner
1248 pages
62h 25m
English
• Objects of class SecureRandom (package java.security; p. 213) can produce nondeterministic random values.
• SecureRandom method nextInt (p. 214) generates a random int value.
• Class SecureRandom provides another version of method nextInt that receives an int argument and returns a value from 0 up to, but not including, the argument’s value.
• Random numbers in a range (p. 214) can be generated with
int number = shiftingValue + randomNumbers.nextInt(scalingFactor);
where shiftingValue specifies the first number in the desired range of consecutive integers, and scalingFactor specifies how many numbers are in the range.
• Random numbers can be chosen from ...
Read now
Unlock full access