MiniJavaCompiler/Test/JavaSources/TestSingleton.java

16 lines
249 B
Java

public class TestSingleton {
TestSingleton instance;
TestSingleton() {
}
public TestSingleton getInstance() {
if (instance == null) {
instance = new TestSingleton();
}
return instance;
}
}