21 lines
512 B
Java
Raw Normal View History

2014-08-11 21:43:08 +03:00
package com.iluwatar;
2014-08-31 08:42:01 +03:00
/**
*
* Singleton pattern ensures that the class (IvoryTower) can have only
* one existing instance and provides global access to that instance.
*
*/
2014-08-11 21:43:08 +03:00
public class App
{
public static void main( String[] args )
{
IvoryTower ivoryTower1 = IvoryTower.getInstance();
IvoryTower ivoryTower2 = IvoryTower.getInstance();
System.out.println("ivoryTower1=" + ivoryTower1);
System.out.println("ivoryTower2=" + ivoryTower2);
}
}