There was an error while loading. Please reload this page.
1 parent d5268fb commit ba96053Copy full SHA for ba96053
Singleton/src/Main.java
@@ -0,0 +1,12 @@
1
+
2
+public class Main {
3
4
+public static void main(String[] args) {
5
+Singleton instance1 = Singleton.getInstance();
6
+Singleton instance2 = Singleton.getInstance();
7
+if(!instance1.equals(instance2))
8
+System.out.println("I'm not a singleton");
9
+else
10
+System.out.println("It's impossible,I'm a Singleton!");
11
+}
12
0 commit comments