// eager initiation
final class Singleton{
private static Singleton SINGLETON=new Singleton()
private Singleton(){
//prevent initiation outside
}//:f
public static Singleton(){
return SINGLETON;
}//:f
public Singleton clone(){
throw new CloneNotSupportedException();
}//:f
}//:c
2008年6月14日星期六
订阅:
博文评论 (Atom)
没有评论:
发表评论