import java.util.Random;
public class t2 {
public static void main(String[] args) {
// TODO Auto-generated method stub
//第一种生成随机数
//Random方法
int a=new Random().nextInt(7)+3;//最大值为9;7为max-min+1;3为min
System.out.println(a);
//第二种生成随机数
// Math.random() 静态方法
//产生的随机数是 0 - 1 之间的一个 double,即 0 <= random <= 1。
int b=(int)(100* Math.random());//85
double c=Math.random();//0.051403043368539514
System.out.println(b);
System.out.println(c);
}
}