指定区间:
97-100 ----》0-3 ----》 r.nextInt(4)+97
1、Random
Random r = new Random();
int a = r.nextInt(10);
2、 Scanner
Scanner sc = new Scanner(System.in);
System.out.println(""); //打印一段提示信息
int age = sc.nextInt(); //等待键盘输入
标签:Java,Scanner,05,int,Random,System,nextInt From: https://www.cnblogs.com/123Aa123/p/17803026.html