Custom Search

Monday, 27 August 2012

Java Program that generate 30 random numbers, Write java code to generate random numbers


Java Program that generate 30 random numbers, Write java code to generate random numbers

Program
import java.util.*;
class randomnos
{
public static void main(String args[])
{
Random R = new Random();
for(int i=0;i<30;i++)
System.out.println(R.nextInt()%30);
}
}

No comments:

Post a Comment

Laptops