A

Admin • 828.03K Points
Coach

Q. What will be the output of the following Java code snippet?
int a = random.nextInt(15) + 1;

  • (A) Random number between 1 to 15, including 1 and 15
  • (B) Random number between 1 to 15, excluding 15
  • (C) Random number between 1 to 15, excluding 1
  • (D) Random number between 1 to 15, excluding 1 and 15
  • Correct Answer - Option(A)
  • Views: 10
  • Filed under category Java
  • Hashtags:

No solution found for this question.
Add Solution and get +2 points.

You must be Logged in to update hint/solution

Discusssion

Login to discuss.

Be the first to start discuss.