You are on page 1of 1

Same set of output

public class Rand {


public static void main(String args[]){
Random rnd = new Random(1050);
for(int i=0;i<5;i++){
System.out.println(rnd.nextInt(10));
}
}

Different set of output


public class Rand {
public static void main(String args[]){
Random rnd = new Random();
for(int i=0;i<5;i++){
System.out.println(rnd.nextInt(10));
}
}

You might also like