Hi there,
Having read about the Singleton, I’m wondering: Why a Singleton with the private constructor stuff and all? Isn’t it easier to create a class with static methods and a static initializer, something for example like:
public class Test {
private static String value;
static {
value = "test";
}
public static String getValue() {
return value;
}
}
Isn’t that easier than the java singleton stuff?
What great advantage about the singleton am I missing?
Greetings,
Erik