Edit: Answered - error was method wasn\'t static
I\'m used the Singleton Design Pattern
public class Singleton {
private static final Singleton I
you should be using public static Singleton getInstance(), but the implementation is not very correct.
if (instance == null) {
instance = new Singleton();
}
return instance;
This is how you should be doing it. This ensure that it creates the instance if it does not exist, or simply returns the existing instance. Your code would also do the same thing, but this add to the readability.