public class DemoApplicationTests { @Test public void contextLoads() { Random random = new Random(47); int aa = random.nextInt(100); System.out.println(aa+"------"); for (int i=0;i<10;i++){ Random random00 = new Random(47); int bb = random00.nextInt(100); System.out.println(bb); } } }
输出结果:
58------
58
58
58
58
58
58
58
58
58
58
public class DemoApplicationTests { @Test public void contextLoads() { Random random = new Random(47); int aa = random.nextInt(100); System.out.println(aa+"------"); for (int i=0;i<10;i++){ Random random00 = new Random(47); int bb = random00.nextInt(10000); System.out.println(bb); } } }
输出结果:
58------
9258
9258
9258
9258
9258
9258
9258
9258
9258
9258
文章评论