lundi 8 janvier 2018

Why are some methods in class ThreadLocalRandom not in class Random?

The ThreadLocalRandom class was introduced in jdk 1.7. It has some convenient methods in addition to those already in java.util.Random, such as nextInt(least, bound) and nextLong(n). Is there any reason these weren't added to java.util.Random? After all, it's not as if they didn't want to touch class Random, as they had added a whole load of new methods to it in Java 8.

I'm looking for any objective technical reasons (not opinions).




Aucun commentaire:

Enregistrer un commentaire