Page 1 of 1

Which statement creates a low-overhead, low contention random number generator that is isolated to a thread to generate

Posted: Wed Jun 07, 2023 6:11 am
by answerhappygod
Which statement creates a low-overhead, low contention random number generator that is isolated to a thread to generate a random number between 1 and 100?

A. int i = ThreadLocalRandom.current().nextInt (1, 101);
B. int i = ThreadSaferandom.current().nextInt(1, 101);
C. int i = (int) Math.random()*.nextInt(1, 101);
D. int i = (int) Match.random (1, 101); E. int i = new Random (). nextInt (100)+1;