Java多線程2:synchronized

synchronized 先看一段代碼: public class Account { private int money; public Account(int money) { this.money = money; } public void deposit(int my) { int tmp = this.money; tmp += my; try {
相關文章
相關標籤/搜索