You are viewing a single comment's thread. Return to all comments →
Not quite 'the best' if you think of synchronization + serialization: http://www.journaldev.com/1377/java-singleton-design-pattern-best-practices-examples . Maybe enum could win some more points.
(but this pattern should be avoided as much as possible)
Seems like cookies are disabled on this browser, please enable them to open this website
Java Singleton Pattern
You are viewing a single comment's thread. Return to all comments →
Not quite 'the best' if you think of synchronization + serialization: http://www.journaldev.com/1377/java-singleton-design-pattern-best-practices-examples . Maybe enum could win some more points.
(but this pattern should be avoided as much as possible)