We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent e262155 commit c6d0d28Copy full SHA for c6d0d28
singleton/src/main/java/com/iluwatar/singleton/IvoryTower.java
@@ -32,19 +32,17 @@ public final class IvoryTower {
32
*/
33
private IvoryTower() {}
34
35
- private static class IvoryTowerHolder {
36
- /**
+ /**
37
* Static to class instance of the class.
38
39
- private static final IvoryTower INSTANCE = new IvoryTower();
40
- }
+ private static final IvoryTower INSTANCE = new IvoryTower();
41
42
/**
43
* To be called by user to obtain instance of the class.
44
*
45
* @return instance of the singleton.
46
47
public static IvoryTower getInstance() {
48
- return IvoryTowerHolder.INSTANCE;
+ return INSTANCE;
49
}
50
0 commit comments