Sometimes you need to generate a random number. In Java, the easiest way to do this is to invoke
Math.random(). This method returns a value from [0 - 1) which means from 0 (inclusive) up to but not including 1 (exclusive). You can adjust the output by multiplying by a constant and then
(int) casting the result, to lop off the decimal part.
Here are some examples and what they return: