小编Ant*_*hos的帖子

静态方法和线程安全

以下代码线程是否安全?

    public static Entity getInstance(){
//the constructor below is a default one.
     return new Entity();
    }
Run Code Online (Sandbox Code Playgroud)

java

4
推荐指数
1
解决办法
1559
查看次数

标签 统计

java ×1