There are two ways to generate random numbers:
Math.random (eh, basic but functional) and the Random class. Math.random() generates a double on the interval [0,1) (includes 0, doesn't include 1).
...