Last active
January 1, 2018 00:56
-
-
Save rafaellucio/bcb67c8ca1da749934711d68bd9edb03 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public class Logger { | |
public void success(string message) { | |
System.out.println(String.format("SUCCESS %s", message)); | |
} | |
public void success(string message) { | |
System.out.println(String.format("SUCCESS %s", message)); | |
} | |
} | |
public class SingletonLogger { | |
private Logger instance = null; | |
private Logger createInstance() { | |
return new Logger(); | |
} | |
public getInstance() { | |
if(this.instance == null) { | |
this.instance = this.createInstance(); | |
} | |
return this.instance; | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment