Java Mailing List Archive

Home » Home (12/2007) » J2EE Pattern »

How to add new functionality to Singleton class?

Julia Liu


I try to correct my last question.
If I have an block of following codes:
public class Singleton{
       prvate static Singleton instance = new Singlrton();
       private Singleton(){}
       public static getInstance(){
                 return instance;
      public Object clone() throws CloneNotSupportedException{
                throw new CloneNotSupportedException();
If I try to add new functionality, might I create super class of Singleton?

Julia  Liu 

Do You Yahoo!?
Tired of spam? Yahoo! Mail has the best spam protection around ==================================================================== Companion Site: J2EE BluePrints: List Archive: Unsubscribing: email "signoff J2EEPATTERNS-INTEREST" to

©2008 - Jax Systems, LLC, U.S.A.