mirror of
https://github.com/tiennm99/java-design-patterns.git
synced 2026-05-15 18:59:10 +00:00
added singleton sample
This commit is contained in:
@@ -0,0 +1,13 @@
|
||||
package com.iluwatar;
|
||||
|
||||
public class IvoryTower {
|
||||
|
||||
private static IvoryTower instance = new IvoryTower();
|
||||
|
||||
private IvoryTower() {
|
||||
}
|
||||
|
||||
public static IvoryTower getInstance() {
|
||||
return instance;
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user