摘要:
一、用Math包中方法实现1.随机产生四位数[1000,9999] num=(int)(Math.random()*9000)+1000; Math.random()方法是产生double型[0,1)的数据,[0,1)*9000=[1,9001),用int类型强转后便... 阅读全文
摘要:
一、用Math包中方法实现1.随机产生四位数[1000,9999] num=(int)(Math.random()*9000)+1000; Math.random()方法是产生double型[0,1)的数据,[0,1)*9000=[1,9001),用i... 阅读全文