摘要: 案例一 package com.chengguo.线程; /** * 同步锁之买票不安全的情况演示 */ public class Demo_20200523001_SynchronizedUnsafe { public static void main(String[] args) { //创建对 阅读全文
posted @ 2020-06-18 17:29 忧桑の民工 阅读(139) 评论(0) 推荐(0) 编辑
摘要: package com.chengguo.线程; /** * 同步锁之买票不安全的情况演示 */ public class Demo_20200523001_SynchronizedUnsafe { public static void main(String[] args) { //创建对象调用方 阅读全文
posted @ 2020-06-18 17:28 忧桑の民工 阅读(100) 评论(0) 推荐(0) 编辑
摘要: package com.chengguo.线程; /** * 线程守护【举例:上帝守护人类】 */ public class Demo_20200522001_Daemon { public static void main(String[] args) { //创建线程 God god = new 阅读全文
posted @ 2020-06-18 17:27 忧桑の民工 阅读(96) 评论(0) 推荐(0) 编辑