Java Coder
How do I generate random number?
1 Answer(s)      2 years and 9 months ago
Posted in : Java Beginners

In my Java program there is a requirement of generating random numbers between two given numbers. How do I write code for generating the random number?

Thanks

Ads

View Answers

December 22, 2013 at 3:33 PM


Hi,

The java.util.Random class can be used to generate the random numbers.

Check the tutorial: Generate random numbers in Java.

Thanks










Ads

Advertisement