Generating random integers using Random().nextInt(int bound)

In this tutorial we see how to generate a random number using the Random class in java and using the method  Random().nextInt(int bound). We will create a class named RandomIntegerGenerator. In this class we will use Random().nextInt(int bound) . It generates a random integer from 0 (inclusive) to bound (exclusive). Here we will set the bound … Read more