How can I generate random numbers in Java?

1 votes
193 views
Siris Jain asked 20-Dec-2017 in Technology by Siris Jain
edited 20-Dec-2017 by Siris-Jain

How can I generate random numbers in Java?

1 Answer

0 votes
Harsh kumar srivastava answered 20-Dec-2017 by Harsh kumar srivastava

In Java, generating a series of random number's is one those common task. You can be achieved it simply by using java.util.Random class.

You can generate random numbers in Java by using Math.random(). It generates random number's between 0.1 to 1.0. You can use the random class in package java.util to generate random number's in Java.

Hope it's informative...