package day4
;
public class Random1
{
public static void main(String
[] args
)
{
java
.util
.Random tools
= new java.util.Random();
int num
= tools
.nextInt();
System
.out
.println("随机整数:" + num
);
double d
= tools
.nextDouble();
System
.out
.println("随机小数:" + d
);
int rangeNum
= tools
.nextInt(10);
System
.out
.println("随机整数:" + rangeNum
);
}
}
转载请注明原文地址:https://tech.qufami.com/read-5193.html