希望能够详细说
说得分展些

解决方案 »

  1.   

    当然可以,一般用于构造单例:
    public class Test{
      public static Test instanse;  private Test(){}
      public synchronized static getInstanse(){
         if(null == instanse) instanse = new Test();
         return instanse;
      }
    }
      

  2.   

    li_d_s(我是小鬼-我表情优哉药盒打开) 不错
      

  3.   

    打漏了一个单词,应该是public synchronized static Test getInstanse(){
      

  4.   

    构造方法用private ? 那这个类不会有子类了 其他应该没什么影响
      

  5.   

    yanggan() ( 一级(初级)) 信誉:100  2007-05-16 15:55:27  得分:0

    构造方法用private ? 那这个类不会有子类了 其他应该没什么影响
    ============================================================
    绝户类!!??呵呵