I would like to get a random value between 1 to 50 in Java.

How may I do that with the help of Math.random();?

How do I bound the values that Math.random() returns?

2 s
2

Tags:

Leave a Reply

Your email address will not be published. Required fields are marked *