public class Square {
public static void main(String[] args) {
Random rand = new Random(7);
for (int i = 0; i < 11; i++)
System.out.print(rand.nextInt(10)+ " ");
}
}
-----------------------------------------------------------
public class Square {
public static void main(String[] args) {
Random rand = new Random();
for (int i = 0; i < 11; i++)
System.out.print(rand.nextInt(10)+ " ");
}
}
两个有什么区别?为什么第一个运行完后,就不再随机了 |
|