example of Random Number Generator in java
Generating a series of random numbers is one of those common tasks that crops up from time to time. In Java, it can be achieved simply by using the java.util.Random class.
The first step, as with the use of any API class, is to put the import statement before the start of your program class:
import java.util.Random;
Next, create a Random object:
Random rand = new Random();
The Random object provides you with a simple random number generator.
----------------------------------------------------------------------
learn Complete java Tutorial Course in 8 hours
For Watch and Learn More videos
+++++++++++++++++++++++++++++++++++
Android Development Complete Course
Complete course c++ programming learn
Ethical Hacking with kali
Subscribe our channel
visit our website nextsoltech.com/learn