Why would somebody write a singleton like this (with volatile and synchronized)?
public class Singleton {
private volatile static Singleton singleton;
private Singleton(){}
...
Type: Posts; User: jenniferruurs
Why would somebody write a singleton like this (with volatile and synchronized)?
public class Singleton {
private volatile static Singleton singleton;
private Singleton(){}
...