testrandvals.java
来自「Java编程思想这本书很好」· Java 代码 · 共 21 行
JAVA
21 行
//: c08:TestRandVals.java
// From 'Thinking in Java, 3rd ed.' (c) Bruce Eckel 2002
// www.BruceEckel.com. See copyright notice in CopyRight.txt.
import com.bruceeckel.simpletest.*;
public class TestRandVals {
private static Test monitor = new Test();
public static void main(String[] args) {
System.out.println(RandVals.randomInt);
System.out.println(RandVals.randomLong);
System.out.println(RandVals.randomFloat);
System.out.println(RandVals.randomDouble);
monitor.expect(new String[] {
"%% -?\\d+",
"%% -?\\d+",
"%% -?\\d\\.\\d+E?-?\\d+",
"%% -?\\d\\.\\d+E?-?\\d+"
});
}
} ///:~
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?