The singleton mode is recommended to be implemented as a static inner class. For details, please refer to: Java Memory Model FAQ (11) Does the new memory model fix the double lock check problem?
The singleton mode is recommended to be implemented as a static inner class. For details, please refer to: Java Memory Model FAQ (11) Does the new memory model fix the double lock check problem?