publicclassSingleton{privatestaticSingletoninstance=null;publicstaticsynchronizedSingletongetInstance(){if(instance==null){instance=newSingleton();returninstance;}}}