阅读背景:

为什么Java构造函数不能被同步?

来源:互联网 

According to the Java Language Specification, constructors cannot be marked synchronized because other threads cannot see the object being created until the thread creating it has finished it. This seems a bit odd, because I can indeed have another thread view the object while it's being constructed:, c




你的当前访问异常,请进行认证后继续阅读剩余内容。

分享到: