Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- class Signleton{
- private static Singleton singleton
- private Singleton(){
- //... do other intantiation stuff here..
- }
- public static Singleton getInstance(){
- if(singleton == null){
- this.singleton = new Singleton();
- }
- return singleton;
- }
- // other responsibities...
- ..
- ...
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement