Which statement creates a low overhead, low-contention random number generator that is isolated to thread to generate a random number between 1 and 100?

Which statement creates a low overhead, low-contention random number generator that is
isolated to thread to generate a random number between 1 and 100?

Which statement creates a low overhead, low-contention random number generator that is
isolated to thread to generate a random number between 1 and 100?

A.
int i = ThreadLocalRandom.current().nextInt(1, 101);

B.
int i = new random().nextInt(100)+1;

C.
int i = (int) Math.random(1, 101);

D.
int i = (int) Math.random()*100+1;

E.
int i = ThreadSafeRandom.current().nextInt(1, 101);



Leave a Reply 1

Your email address will not be published. Required fields are marked *