摘要: 线程通信 wait notifysynchronized + 同对象 才可 互斥 锁不是放在线程上的,放在共享资源内部的。wait 线程等待 notify 线程唤醒 阅读全文
posted @ 2015-07-24 20:32 奋斗?坑 阅读(104) 评论(0) 推荐(0) 编辑
摘要: 线程互斥public void method1() { synchronized(this) { ... } } 等同于 public synchronized void method1() { ... }public void method2() { synchronized(XXXX.class... 阅读全文
posted @ 2015-07-24 20:27 奋斗?坑 阅读(83) 评论(0) 推荐(0) 编辑
摘要: 1、Timer2、TimerTask3、new Timer().schedule(new TimerTask( public void run(){...} ),long/date [,long]);定时器 阅读全文
posted @ 2015-07-24 20:25 奋斗?坑 阅读(97) 评论(0) 推荐(0) 编辑
摘要: 1、实现线程的方法:1)extend Thread2)implements Runnable2、下面代码执行哪个run方法: new Thread( new Runnable(){ public void run(){1111} }){ public void run(){222} ... 阅读全文
posted @ 2015-07-24 20:23 奋斗?坑 阅读(115) 评论(0) 推荐(0) 编辑
摘要: hibernate 阅读全文
posted @ 2015-07-24 17:19 奋斗?坑 阅读(256) 评论(0) 推荐(0) 编辑