摘要: ** * 对业务写方法加锁 * 对业务读方法不加锁 * 容易产生脏读问题 就是对写加锁但对读没有加锁,这样在写的过程中可能还没写完就被读了 * * */public class Demo { String name; double balance; public synchronized void 阅读全文
posted @ 2020-04-29 22:11 北城cheng 阅读(570) 评论(0) 推荐(0) 编辑