Skip to content

Commit 6aaff79

Browse files
committed
👷 Package fixe
1 parent 8c03c20 commit 6aaff79

File tree

6 files changed

+18
-0
lines changed

6 files changed

+18
-0
lines changed
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.

com/singleton/SingletonTradeSafe.java

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
package com.singleton;
2+
3+
/**
4+
* Created by sdmg15 on 18/03/17.
5+
*/
6+
public class SingletonTradeSafe {
7+
8+
private static SingletonTradeSafe instance;
9+
10+
private SingletonTradeSafe(){}
11+
12+
public static synchronized SingletonTradeSafe getInstance(){
13+
if(instance == null){
14+
instance = new SingletonTradeSafe();
15+
}
16+
return instance;
17+
}
18+
}

0 commit comments

Comments
 (0)