This question already has an answer here:
I have the following code:
Random random = new Random(); int num1 = random.nextInt(5);
What are my possible values for num1?
num1
0, 1, 2, 3, 4, 5
0
1
2
3
4
5
or
0, 1, 2, 3, 4
Aucun commentaire:
Enregistrer un commentaire