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);}
복습용 저장
복습용 저장
이 항목을 북마크하거나, 어렵게 표시하거나, 복습 세트에 넣을 수 있습니다.