以上例而言,在Stack的方法上標示synchronized(此時稱為synchronized method),表示進入synchronized時,必須取得Stack物件的鎖定旗標(對synchronized metho來說,預設 ...
確定! 回上一頁