Multiple choice

Random is a class present in

  1. java.util

  2. java.io

  3. java.utility

  4. java.math

Reveal answer Fill a bubble to check yourself
A Correct answer
Explanation

The Random class is part of java.util package and is used for generating pseudorandom numbers. It provides methods like nextInt(), nextDouble(), nextBoolean(), and nextFloat() for various random number types. This is different from Math.random() which returns a double value. Random is not in java.io, java.utility (doesn't exist), or java.math packages.