Home / Programming MCQs / JAVA MCQs / Question

R

Ram Sharma • 178.09K Points
Coach

Q. Which method in java is used to generate random numbers in Java?

(A) random.nextInt()
(B) random()
(C) rand()
(D) All of these

Explanation:

The Java method random.nextInt() is used to generate random numbers.

You must be Logged in to update hint/solution

Discusssion

Login to discuss.