0 votes
in JAVA by
Which package contains the Random class?

i) java.util package

ii) java.lang package

iii) java.awt package

iv) java.io package

1 Answer

0 votes
by

i) java.util package

Reason: The Random class is available in the java.util package. An object of the Random class is used to generate a series of pseudorandom numbers. And the object of this class is a thread-safe and cryptographically insecure object. The Random class provides a variety of methods that are used to create random numbers of type integers, float, long, double, etc.

Related questions

0 votes
asked Apr 8, 2021 in JAVA by SakshiSharma
0 votes
asked Apr 8, 2021 in JAVA by SakshiSharma
...