The Class Random

In this lesson, we’ll look at how Java provides values chosen at random.

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 ...

Access this course and 1400+ top-rated courses and projects.