Random r = new Random(); for (int i = 0; i < 10; i++) { System.out.println(r.nextInt(100));//1-100之间生成随机数 }