2015年10月13日
摘要: 可以再更新之后调用NotificationManager manager = (NotificationManager) getSystemService(Context.NOTIFICATION_SERVICE);manager.notify(id, notification);就可以了 阅读全文
posted @ 2015-10-13 16:40 T00YOUNG 阅读(227) 评论(0) 推荐(0) 编辑
  2015年10月3日
摘要: 1 public class Main{ 2 3 public static Num n = new Num(); 4 5 public static void main(String[] args) { 6 Produce p1 = new... 阅读全文
posted @ 2015-10-03 17:28 T00YOUNG 阅读(169) 评论(0) 推荐(0) 编辑
摘要: 1 public class Main{ 2 3 /*模拟死锁 4 * 5 * PersonA要拿到B才把A给B 6 * PersonB要拿到A才把B给A 7 * 8 * 9 * 10 */11 12 ... 阅读全文
posted @ 2015-10-03 12:12 T00YOUNG 阅读(388) 评论(0) 推荐(0) 编辑
  2015年10月2日
摘要: StringBuffer是线程安全的,StringBuilder是线程不安全的先上代码 1 public class Main { 2 StringBuffer sbuffer = new StringBuffer(); 3 StringBuilder sbuilder = new ... 阅读全文
posted @ 2015-10-02 21:51 T00YOUNG 阅读(1164) 评论(0) 推荐(0) 编辑