Random
位于
java.util
包下,可以产生随机数
import java.util.Random;
public class RandomTest01 {
public static void main(String[] args) throws Exception{
Random r = new Random();
for (int i=0; i<5; i++) {
System.out.println(r.nextInt(100));
}
}
}