package test; import java.util.Random; public class RandomDemo { public static void main(String[] args) { Random random = new Random(); //输出5个0~100之间的随机数 for(int i=0; i<5; i++) { System.out.print(random.nextInt(100) + "\t");//2 28 14 20 12 } } }
原文地址:https://www.cnblogs.com/wuyuwuyueping/p/9388883.html
时间: 2024-11-06 07:21:06