Ai
1 Star 0 Fork 59

Yangjianwei/java-performance

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
该仓库未声明开源许可证文件(LICENSE),使用请关注具体项目描述及其代码上游依赖。
克隆/下载
Instance.java 528 Bytes
一键复制 编辑 原始数据 按行查看 历史
xiandafu 提交于 2019-11-12 14:15 +08:00 . ”test“
package com.ibeetl.code.ch03;
/**
* 虽然都知道是这个例子是错误的单例,但在并发情况下会有哪些错误,分析起来很有意思,能说完所有的可能错误,就说明对并发了解了
* @author 公众号 java系统优化
*/
public class Instance {
static Instance ins = null;
private Instance(){}
public static Instance instance(){
if(ins==null){
ins = new Instance();
ins.init();
}
return ins;
}
private void init(){
// Instance对象初始化
}
}
Loading...
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
1
https://gitee.com/higher/java-performance.git
git@gitee.com:higher/java-performance.git
higher
java-performance
java-performance
master

搜索帮助