jeudi 24 mars 2016

Using random number generator

I'm having trouble using the random number generator, or having trouble understanding the concept entirely, so forgive me. I want to generate 20 random numbers from 0 to x.

Random ranNum= new Random(); int n = ranNum.nextInt(x) + 0;

is this how I would go about it? Thank you!




Aucun commentaire:

Enregistrer un commentaire