vendredi 14 août 2015

Why is so useful `nextInt(min, bound)` method added to ThreadLocalRandom class but not Random?

See ThreadLocalRandom#nextInt(origin, bound), this method is absent in java.util.Random

Demand for this method is very high: Generating random integers in a range with Java, 1300+ upvotes on StackOverflow

Apparently another reason to abandon the vanilla Random class?




Aucun commentaire:

Enregistrer un commentaire