| Sign In/My Account | View Cart |
| Article: |
Using the Singleton Pattern | |
| Subject: | Use static initializer for thread safety | |
| Date: | 2003-08-29 13:10:36 | |
| From: | anonymous2 | |
|
public static Object getInstance(){ if(instance == null) instance = new Object(); return instance; }
|
||