【JAVA】一例モード
246 ワード
public class Test {
private Test() {
}
private static class Holder {
private static Test INSTANCE = new Test();
}
public static Test getInstance() {
return Holder.INSTANCE;
}
}