Rolling a die involves math.
Right? Why would someone ever say that?
Well, in Java and basically in programming, it does. Fortunately, the work is mostly behind the scenes, but we will need to do some work with variables and value types to get it all to work the way we want it.
Create a Random Number Generator
Working with random numbers requires working with a special class called the Random class.
When we work with some classes, like Math, we can just work with the class name and a method name after it. This is called a static class. We don’t need to do anything special with it. There is a ...