|
The Singleton Pattern
An Introduction with Examples in Java |
|
Prof. David Bernstein
|
| Computer Science Department |
| bernstdh@jmu.edu |
FileViewer
FileViewer
createInstance() method might
be called by multiple threads, problems can arisecreateInstance() synchronizedinstance
when it is declared)