摘要: package com.sean.base.threadStudy; /** * 测试守护线程 * 上帝守护你 * @create 2021-02-27 19:57 */ public class DaemonDemo { public static void main(String[] args) 阅读全文
posted @ 2021-02-27 20:06 之樾 阅读(35) 评论(0) 推荐(0)
摘要: package com.sean.base.threadStudy; /** * 测试线程的优先级 * @create 2021-02-27 19:46 */ public class PriorityDemo { public static void main(String[] args) { / 阅读全文
posted @ 2021-02-27 19:55 之樾 阅读(46) 评论(0) 推荐(0)
摘要: package com.sean.base.threadStudy; /** * //观察测试线程的状态 * @create 2021-02-27 19:36 */ public class StateDemo { public static void main(String[] args)thro 阅读全文
posted @ 2021-02-27 19:44 之樾 阅读(40) 评论(0) 推荐(0)
摘要: package com.sean.base.threadStudy; /** * 测试join方法//想象为插队 * @create 2021-02-27 19:26 */ public class JoinDemo implements Runnable{ @Override public voi 阅读全文
posted @ 2021-02-27 19:34 之樾 阅读(25) 评论(0) 推荐(0)
摘要: package com.sean.base.threadStudy; /** * //测试礼让线程 * //礼让不一定成功,看cpu心情 * @create 2021-02-27 19:19 */ public class YieldDemo { public static void main(St 阅读全文
posted @ 2021-02-27 19:25 之樾 阅读(19) 评论(0) 推荐(0)
摘要: package com.sean.base.threadStudy; import com.sean.base.object01.SimpleDateFormatDemo; import java.text.SimpleDateFormat; import java.util.Date; /** * 阅读全文
posted @ 2021-02-27 19:22 之樾 阅读(27) 评论(0) 推荐(0)
摘要: package com.sean.base.threadStudy; /** * * @create 2021-02-27 14:37 */ public class TestLambda2 { public static void main(String[] args) { Ilove love 阅读全文
posted @ 2021-02-27 15:06 之樾 阅读(50) 评论(0) 推荐(0)
摘要: package com.sean.base.threadStudy; /** * 推导lambda表达式 * @create 2021-02-27 14:17 */ public class TestLambda1 { //3静态内部类 static class Like2 implements I 阅读全文
posted @ 2021-02-27 14:41 之樾 阅读(58) 评论(0) 推荐(0)
摘要: package com.sean.base.threadStudy; /** * 静态代理模式总结: * 真实对象和代理对象都要实现同一个接口 * 代理对象要代理真实角色 * * 好处:代理对象可以做很多真实对象做不了的事情,真实对象专注做自己的事情 * @create 2021-02-27 13: 阅读全文
posted @ 2021-02-27 14:13 之樾 阅读(58) 评论(0) 推荐(0)