标签:math index stat array new system print length static
package Sep_16;
public class Array {
public static void main(String[] args) {
String a[]=new String[]{"张三","李四","王五","赵六","鬼脚七"};
System.out.println(a[(int) (Math.random()*a.length)]);
int []array={2,35,26,754,358,346,906,356,14,89,};
double b=Math.random();
double c=Math.random()*array.length;
int index=(int) (Math.random()*array.length);
System.out.println(array[index]);
}
}
标签:math index stat array new system print length static
原文地址:http://www.cnblogs.com/wanghusuoyi/p/7532856.html