显示当前运行java代码的运行时的各种参数方案参考
来源:才华咖 阅读:2.04W 次
不带显String操作。
复制代码 代码如下:
package systeminfo;
import ator;
import y;
import erties;
public class sysinfo {
public static void main(String[] args) {
Properties p = roperties();
Iterator<Entry
> it= ySet()ator();
while(ext()){
Entry
item=();
t(ey()+"===");
tln(alue());
}
}
}
简单版本
复制代码 代码如下:
package systeminfo;
public class sysinfo {
public static void main(String[] args) {
String s = roperties()ring();
tln(s);
}
}
String版本
复制代码 代码如下:
package systeminfo;
public class sysinfo {
public static void main(String[] args) {
String s = roperties()ring();
tln(s);
String[] ss=t(",");
for(String e:ss){
tln(e);
}
}
}
热门内容
大家都在看
最近更新