The Class Random
In this lesson, we’ll look at how Java provides values chosen at random.
We'll cover the following...
Pseudorandom numbers
Applications such as games, lotteries, and simulations depend upon numbers that are chosen at random. Since computers are programmed, we cannot expect them to produce truly random numbers. Instead, we can create a sequence of numbers that does not repeat itself for a very long time. The numbers within any portion of this long sequence will appear to be random. Such numbers are called pseudorandom numbers, but we simply will call them random numbers. We use a random number generator to produce these numbers.
Seed
To begin a sequence of random numbers, we take a number called the ...