A

Admin • 828.03K 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
  • Correct Answer - Option(A)
  • Views: 13
  • Filed under category Java
  • Hashtags:

Explanation by: Admin
The Java method random.nextInt() is used to generate random numbers.

You must be Logged in to update hint/solution

Discusssion

Login to discuss.

Be the first to start discuss.