Commented singleton example.

This commit is contained in:
Ilkka Seppala
2014-08-31 08:42:01 +03:00
parent ed81bcf69b
commit 54b414acb1
2 changed files with 11 additions and 0 deletions

View File

@ -1,5 +1,11 @@
package com.iluwatar;
/**
*
* Singleton pattern ensures that the class (IvoryTower) can have only
* one existing instance and provides global access to that instance.
*
*/
public class App
{
public static void main( String[] args )

View File

@ -1,5 +1,10 @@
package com.iluwatar;
/**
*
* Singleton class.
*
*/
public class IvoryTower {
private static IvoryTower instance = new IvoryTower();