FaltuTech.Club : Fane of Advanced Logical Thriving Utopian Technical Club

Generate Random Numbers Using Java

Generate Random Numbers Using Java


import java.util.Random;
class RandNum{

    public static void main(String args[]){
        Random newRandom = new Random();

	for(int i=0;i

Output


259615430
603747155
856122138
636480740
1731918604
1479987343
2051756868
-1012661989
-173830469
1638839759


Discussion

-- Your output will be Different.

For More details Visit : https://docs.oracle.com/javase/9/docs/api/java/util/Random.html