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 {
相关文章
相关标签/搜索