1. public class Singleton {   
  2.   
  3.   static class SingletonHolder {   
  4.     static Singleton instance = new Singleton();   
  5.   }   
  6.   
  7.   public static Singleton getInstance() {   
  8.     return SingletonHolder.instance;   
  9.   }   
  10.   
  11. }  

belong to Bob lee,google。

评论
发表评论

您还没有登录,请登录后发表评论

roc8633284
搜索本博客
评论排行榜