Random rand = new Random(); int randomInt = rand.nextInt(101); System.out.println(randomInt);
Random rand = new Random(); double randomDouble = rand.nextDouble(); System.out.println(randomDouble);
Random rand = new Random(); boolean randomBoolean = rand.nextBoolean(); System.out.println(randomBoolean);Package Library: Java.util is a standard Java package library. It is used for various utility classes such as date and time manipulation, input and output operations, random number generation, etc.