/*
* User1_MySingleton.java
*
* Disclaimer:
* ZebraSoft.com disclaims all warrantees with
regard to documents/programs, including
* all implied
warranties. In no event shall ZebraSoft.com be liable for indirect or
* consequential
damages or any damages whatsoever resulting from loss of use, data or
* profits arising out
of the use of documents/programs.
*
* All content included on this site, such as
text, graphics, logos, button icons,
* images, audio
clips, video clips, digital downloads, programs, data compilations,
* and software, is
the property of ZebraSoft.com or its content suppliers and
* protected by United States and international
copyright laws.
*
* This site or any portion of this site may
not be reproduced, duplicated,
* copied, sold, resold, visited, or otherwise
exploited for any commercial
* purpose without
express written consent of ZebraSoft.com.
*/
package creational_patterns.my_singleton;
/**
*
* @author
*/
import java.lang.*;
import java.util.*;
import java.io.*;
public class User1_MySingleton implements MySingletonUser {
/** Creates a new
instance of User1_MySingleton */
public
User1_MySingleton() {
MySingleton mySingletonHandler_1 = getInstance();
System.out.println("First call to MySingleton");
System.out.println(" ====================");
MySingleton mySingletonHandler_2 = getInstance();
System.out.println(" Second call to MySingleton");
}
/**
*
*
*/
public MySingleton getInstance(){
return(MySingleton.makeInstance());
}
/**
*
*/
public static
void main (String[] args)
{
User1_MySingleton
user1_MySingletonHandle = new User1_MySingleton();
}
}