public class Randomdemo
{
public static void main(String []args){
System.out.println((int) (Math.random()*100)); // 生成一个整数型 100以内的随机数
}
}
java取随机数
最新推荐文章于 2024-09-12 16:49:32 发布
public class Randomdemo
{
public static void main(String []args){
System.out.println((int) (Math.random()*100)); // 生成一个整数型 100以内的随机数
}
}