第2个回答 2013-04-17
public static void main(String[] args) {
// TODO Auto-generated method stub
int n1 = 20;//生成随机数次数
int n2 = 100;//生成随机数范围
String [] s = new String[n1];
Random r = new Random();
for(int i = 0;i<n1;i++){
s[i] = ""+r.nextInt(n2);
System.out.print(s[i]+" ");
}本回答被网友采纳