部分Runtime源码如下:
public class Runtime {
private static Runtime currentRuntime = new Runtime();//静态属性成员,代表实例
/**
* @return the <code>Runtime</code> object associated with the current
* Java application.
*/
public static Runtime getRuntime() {//静态方法,获得Runtime实例
return currentRuntime;
}
/** Don't let anyone else instantiate this class */
private Runtime() {}//私有的构造方法
}