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);}
Salvar para revisao
Salvar para revisao
Adicione este item aos favoritos, marque-o como dificil ou coloque-o em um conjunto de revisao.
Faca login para salvar favoritos, perguntas dificeis e conjuntos de revisao.