Approved.
Sample tests are still unfixed.
fixed
Issue: JUnit uses assertEquals(expected, actual) argument order.
assertEquals(expected, actual)
Since JDK 17 java.util.Random implements the RandomGenerator interface which provides default implementations of nextInt(lo, hi) for all random classes. Nevertheless ThreadLocalRandom has the nicer prng algorithm.
java.util.Random
RandomGenerator
nextInt(lo, hi)
ThreadLocalRandom
Math.random()
Random::ints(lo, hi)
Random::nextInt(hi)
ThreadLocalRandom::nextInt(lo, hi)
Loading collection data...
Approved.
Sample tests are still unfixed.
fixed
Issue: JUnit uses
assertEquals(expected, actual)
argument order.Since JDK 17
java.util.Random
implements theRandomGenerator
interface which provides default implementations ofnextInt(lo, hi)
for all random classes. NeverthelessThreadLocalRandom
has the nicer prng algorithm.Math.random()
, really? There areRandom::ints(lo, hi)
, andRandom::nextInt(hi)
, andThreadLocalRandom::nextInt(lo, hi)
today.