- Learning Java by Building Android Games
- John Horton
- 55字
- 2021-07-23 19:02:21
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
.