获得以当前时间为种子的随机数 static void main(String[] args) { long t = System.currentTimeMillis();//获得当前时间的毫秒数 Random rd = new Random(t);//作为种子数传入到Random的构造器中 System.out.println(rd.nextInt());//生 java 2023-09-14 112 点赞 1 评论 169 浏览