成人AV在线无码|婷婷五月激情色,|伊人加勒比二三四区|国产一区激情都市|亚洲AV无码电影|日av韩av无码|天堂在线亚洲Av|无码一区二区影院|成人无码毛片AV|超碰在线看中文字幕

synchronized膨脹機(jī)制 java synchronized鎖對(duì)象,當(dāng)對(duì)象引用是null的時(shí)候,鎖的是什么?

java synchronized鎖對(duì)象,當(dāng)對(duì)象引用是null的時(shí)候,鎖的是什么?謝邀!Java語(yǔ)言規(guī)范中明確指出如果鎖住的對(duì)象是null,則會(huì)NullPointerException,規(guī)范內(nèi)容如下:

java synchronized鎖對(duì)象,當(dāng)對(duì)象引用是null的時(shí)候,鎖的是什么?

謝邀!

Java語(yǔ)言規(guī)范中明確指出如果鎖住的對(duì)象是null,則會(huì)NullPointerException,規(guī)范內(nèi)容如下:

The type of Expression must be a reference type, or a compile-time error occurs. A synchronized statement is executed by first evaluating the Expression. Then: If evaluation of the Expression completes abruptly for some reason, then the synchronized statement completes abruptly for the same reason. Otherwise, if the value of the Expression is null, a NullPointerException is thrown.

膨脹緊鎖原理是什么?

膨脹緊鎖原理:膨脹鎖一頭是螺紋,一頭有錐度。外面包一鐵皮(有的是鋼管),鐵皮圓筒(鋼管)一半有若干切口,把它們一起塞進(jìn)墻上打好的洞里,然后鎖螺母,螺母把螺釘往外拉,將錐度拉入鐵皮圓筒,鐵皮圓筒被漲開,于是緊緊固定在墻上。知識(shí)點(diǎn)延伸:膨脹鎖上的彈簧墊是標(biāo)準(zhǔn)零件,因?yàn)樗拈_口錯(cuò)開并具有彈性,所以叫做彈簧墊圈,彈簧墊圈的作用是利用錯(cuò)口的銳利尖角刺入螺母和平墊中,防止螺母松動(dòng)。

<bdo id="n4jqf"><meter id="n4jqf"></meter></bdo>
<li id="n4jqf"></li>