Generating random numbers to deploy a sub
We need to deploy a sub' in a random position at the start of each game. There are, however, many possible uses for random numbers as we will see throughout this book. So, let's take a close look at the Random
class and one of its methods nextInt
.