62,634
社区成员




//Property.java
improt java.uitl.*;
public class Perperty{
public static void main(String[] args){
System.out.println(new Date());
Properties p = System.getProperties();
p.list(System.put);
System.out.printin("--Memory Usage--");
Runtime rt = Runtime.getProperty();
system.out.prinln("Total memory = "+rt.totelMemory+"Free memoty = "+tr.freeMemoty);
}
}
package com.kiritor;
//Property.java
import java.util.Date;
import java.util.Properties;
public class Property {
public static void main(String[] args) {
System.out.println(new Date());//得到系统时间,无需多说
Properties p = System.getProperties();//得到相关属性
p.list(System.out);//将属性列表指定到System.out输出流
System.out.println("--Memory Usage--");
Runtime rt = Runtime.getRuntime();//得到运行时的一些信息
System.out.println("Total memory = " + rt.totalMemory()
+ "Free memoty = " + rt.freeMemory());
}
}
public static void main(String[] args){
System.out.println(new Date());
Properties p = System.getProperties();
p.list(System.out);
System.out.println("--Memory Usage--");
Runtime rt = Runtime.getRuntime();
System.out.println("Total memory = "+rt.totalMemory()+"Free memoty = "+rt.freeMemory());
}