testconfig.java
来自「用applet实现很多应用小程序」· Java 代码 · 共 21 行
JAVA
21 行
package test.prefuse;
public class TestConfig {
public static boolean verbose() {
String v = System.getProperty("verbose");
return ( v != null && v.equalsIgnoreCase("true") );
}
public static String memUse() {
// memory usage
long total = Runtime.getRuntime().totalMemory() / (2<<10);
long free = Runtime.getRuntime().freeMemory() / (2<<10);
long max = Runtime.getRuntime().maxMemory() / (2<<10);
return "Memory: " + (total-free) + "K used / "
+ total + "K avail / "
+ max + "K max";
}
}
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?