我正在学习Java中的死锁,并且有来自Sun官方教程的示例代码:AlphonseandGastonarefriends,andgreatbelieversincourtesy.Astrictruleofcourtesyisthatwhenyoubowtoafriend,youmustremainboweduntilyourfriendhasachancetoreturnthebow.Unfortunately,thisruledoesnotaccountforthepossibilitythattwofriendsmightbowtoeachotheratthesametime.pub