How do I generate random number?

Ads

 
 

Share on Google+Share on Google+

Java Coder
How do I generate random number?
1 Answer(s)      3 years and 8 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









Related Tutorials/Questions & Answers:
Advertisements