mercredi 10 avril 2019

Android SDK Random and SecureRandom returning not so random values

I have a singleton that initialises like this:

Random random = new SecureRandom(); // tried with new Random() as well

I use the same instance to call random.nextInt(3) and get results like: 2, 2, 2, 0, 2, 2, 2, 1, 2, 2. What happens?




Aucun commentaire:

Enregistrer un commentaire