Randomlnt.java
TestRandom.java
TestSeed.java
纯随机数发生器
![复制代码](https://common.cnblogs.com/images/copycode.gif)
package demo; import java.util.Scanner; public class Demo { public static void main(String[] args) { Scanner sc = new Scanner(System.in); int size = sc.nextInt(); Demo.myRandom(3, size); } public static void myRandom(int x0, int size) { int x; x = x0; String s = new String(); for(int i=0; i<size; i++) { x *= 214013; x += 2531011; s += (x >> 16) & 0xff; System.out.println(s); s = ""; } } }
![复制代码](https://common.cnblogs.com/images/copycode.gif)
VariableArgumentsTest.java
有方法重载
CalculateN.java
标签:java,String,int,动脑,Scanner,动手,public,size From: https://www.cnblogs.com/wanbeibei/p/17720849.html