198k views
4 votes
Random integer in the range 10 to 15.randGen.nextInt(6) + _____

1 Answer

2 votes

Final answer:

To generate a random integer in the range 10 to 15, use the formula 'randGen.nextInt(6) + 10'.

Step-by-step explanation:

To generate a random integer in the range 10 to 15, you can use the formula 'randGen.nextInt(6) + 10'. The 'nextInt(6)' generates a random number between 0 and 5, and then adding 10 to it ensures that the final result is between 10 and 15.

User Bikesh M
by
8.1k points