Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save rafaellucio/bcb67c8ca1da749934711d68bd9edb03 to your computer and use it in GitHub Desktop.
Save rafaellucio/bcb67c8ca1da749934711d68bd9edb03 to your computer and use it in GitHub Desktop.
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