📄 random.java
字号:
/*
* random.java
*
* Created on 2007年10月14日, 下午3:15
*
* To change this template, choose Tools | Template Manager
* and open the template in the editor.
*/
package org.Adam;
import java.util.Random;
/**
*
* @author Administrator
*/
public class random extends Random{
public float seed=0;
/** Creates a new instance of random */
public random() {
}
public void Random(int seed) {
setSeed(seed);
// return seed;
}
public void setSeed(long seed) {
this.seed = (seed * 10) ;
System.out.println(seed);
// haveNextNextGaussian = false;
}
public static void main(String[] args) {
Random seed=new Random();
seed.setSeed(100);
System.out.println(seed.nextInt(7));
System.out.println(seed.nextInt(8));
}
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -