随机数表⽰⽅法
⼀、Java随机数的产⽣⽅式
  在Java中,随机数的概念从⼴义上将,有三种。
  1、通过System.currentTimeMillis()来获取⼀个当前时间毫秒数的long型数字。
  2、通过Math.random()返回⼀个0到1之间的double值。
  3、通过Random类来产⽣⼀个随机数,这个是专业的Random⼯具类,功能强⼤。/**
* 随机数
*/
//1.随机数类
Random random=new Random();
System.out.println("1.="+Int());
/
/2.当前时间的秒数
System.out.println("2.="+System.currentTimeMillis());
//3.math.random()返回0-1之间的double数
double a=Math.random();
String String(a);
System.out.println("3.="+s.substring(2));
结果:nextint()方法
1.=37138087
2.=1384406178320
3.=2954527886613444