What is enhanced Pseudo-Random Number Generators in Java 17?
It offers a new interface type and solutions for pseudo-random number generators to make using multiple PRNG (Pseudo-Random Number Generators) algorithms simpler and properly support stream-based operations.
Example: RandomGeneratorFactory
public IntStream getPseudoVals(String algorithm, int streamSize) {// returns an IntStream with size @streamSize of random numbers generated using the below @algorithm// where the lower bound is 0 and the upper is 100 (exclusive)return RandomGeneratorFactory.of(algorithm).create().ints(streamSize, 0,100);}
احفظ للمراجعة
احفظ للمراجعة
احفظ هذا العنصر في الإشارات المرجعية، او حدده كصعب، او ضعه في مجموعة مراجعة.
سجل الدخول لحفظ الإشارات المرجعية والاسئلة الصعبة ومجموعات المراجعة.