A

Admin • 828.03K Points
Coach

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

  • (A) Random number between 4 to 7, including 4 and 7
  • (B) Random number between 4 to 7, excluding 4 and 7
  • (C) Random number between 4 to 10, excluding 4 and 10
  • (D) Random number between 4 to 10, including 4 and 10
  • Correct Answer - Option(D)
  • Views: 16
  • 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.