Skip to content

Commit a7da06f

Browse files
author
zed
committed
name
1 parent 5d53796 commit a7da06f

File tree

2 files changed

+13
-13
lines changed

2 files changed

+13
-13
lines changed
Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
package com.example.concurrency.singleton;
2+
3+
public class StaticSingleton {
4+
5+
private StaticSingleton(){
6+
}
7+
public static class StaticSingletonHolder{
8+
private static StaticSingleton singleton= new StaticSingleton();
9+
}
10+
public static StaticSingleton getInstance(){
11+
return StaticSingletonHolder.singleton;
12+
}
13+
}

src/main/java/com/example/concurrency/singleton/StaticSinleton.java

Lines changed: 0 additions & 13 deletions
This file was deleted.

0 commit comments

Comments
 (0)