题库 软件开发 题目列表 请指出下面一段单例的伪代码写法问题? private stat...
多选题
请指出下面一段单例的伪代码写法问题?

private static   SingLeton  instance;
public SingLeton static singleton(){
     synchronized (this){
       
       if(instance == null){
   instance = new SingLeton(); 
       }
     
     }
     return instance;
}

A.

效率不高

B.

很完美

C.

SingLeton实例化不是原子操作,有重复实例化的可能

D.

多线程很安全

E.

多线程不安全

题目信息
校招真题
-
正确率
0
评论
14
点击