19 lines
457 B
Java
19 lines
457 B
Java
// Author: Rodney Shaghoulian
|
|
// Github: github.com/RodneyShag
|
|
// HackerRank: hackerrank.com/RodneyShag
|
|
|
|
import java.util.Scanner;
|
|
import java.lang.reflect.Constructor;
|
|
|
|
class Singleton {
|
|
private Singleton() {}
|
|
public String str;
|
|
private static Singleton instance = null;
|
|
public static Singleton getSingleInstance() {
|
|
if (instance == null) {
|
|
instance = new Singleton();
|
|
}
|
|
return instance;
|
|
}
|
|
}
|