import java.util.*; public class Property { 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 Memory = " + rt.freeMemory( ) ); //打印总内存大小和空闲内存大小 } }
中级程序员
by: 中国人在美国 发表于:2013-07-31 05:13:10 顶(0) | 踩(0) 回复
不知道这个用法,顶一个
回复评论