Added 25 solutions
This commit is contained in:
@@ -0,0 +1,18 @@
|
||||
// Author: Rodney Shaghoulian
|
||||
// Github: github.com/rshaghoulian
|
||||
// HackerRank: hackerrank.com/rshaghoulian
|
||||
|
||||
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;
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user