149k views
1 vote
Which library package would you import to use the class Random? A) java.beans. B) java.io. C) java.lang. D) java.text. E) java.util.

User Mike Kaply
by
8.3k points

1 Answer

7 votes

Answer:

Step-by-step explanation:

The correct answer is E) java.util.

The class Random is part of the java.util package in Java. This package contains a large number of utility classes, including classes for working with dates, times, collections, and random numbers. To use the Random class in a Java program, you would need to import the java.util package using the following statement at the beginning of your code:

User Yuval Pruss
by
8.6k points