MiniJavaCompiler/Test/JavaSources/TestSingleton.java

16 lines
249 B
Java
Raw Normal View History

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