dimanche 11 août 2019

random function C# to java

I have C# codes.

int count = 3;
Random r = new Random(DateTime.Now.Millisecond * DateTime.Now.Minute);
while (count > 0){
     name += "_" + r.Next(0, 99).ToString();
     count--;
}

I need equal r.Next(0, 99) in java. in java we have r.nextInt(int), but in C# r.NEXT(int,int)




Aucun commentaire:

Enregistrer un commentaire