package com.cug.singleton;
import java.io.IOException;
public class RuntimeDemo {
public static void main(String[] args) {
Runtime rt = Runtime.getRuntime();
try {
// rt.exec("notepad");
rt.exec("calc");
} catch (IOException e) {
e.printStackTrace();
}
}
}
/*
public class Runtime {
private Runtime() {}
private static Runtime currentRuntime = new Runtime();
public static Runtime getRuntime() {
return currentRuntime;
}
}
*/
Java基础----一个单例模式的类举例
最新推荐文章于 2022-07-30 21:54:05 发布