Q270
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
AnswerB.
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
Answer: Option A
Solution
Answer: Option A
No explanation is given for this question Let's Discuss on Board