A.synchronized返回值方法名(參數(shù)列表) B.synchronized方法名(參數(shù)列表) C.synchronized返回值構造方法名稱(參數(shù)列表) D.返回值方法名(參數(shù)列表)
A.protected(lock){操作共享資源代碼塊} B.public(lock){操作共享資源代碼塊} C.static(lock){操作共享資源代碼塊} D.synchronized(lock){操作共享資源代碼塊}
A.多線程可以提高代碼的使用率 B.多線程是并發(fā)執(zhí)行的 C.Jvm虛擬機是多線程的 D.通過設置線程的優(yōu)先級來解決線程安全問題,讓優(yōu)先級高的先執(zhí)行,優(yōu)先級低的后執(zhí)行