import java.util.Random;
public class RandomNumber{
public static void main(String args[])
{
// create instance of Random class
Random rand = new Random();
// Generate random integers in range 0 to 99999999
int rand_int1 = rand.nextInt(99999999);
// Print random integers
System.out.println("Random Number: "+rand_int1);
}
}
OUTPUT:
Random Number: 67779032
No comments:
Post a Comment