生成随机数:
package text;
public class text {
public static void main( String args[] )
{
int k;
// summarize results
for ( int i = 1; i <= 1000; i++ ) {
k = 1 + (int) ( Math.random() * 1000);
System.out.print(k+"\n");
}
}
}
原文:http://www.cnblogs.com/liushiqiang123/p/7663528.html