4月16日,TestSecurity,每日20行。
来源:互联网 发布:浮云网淘宝小号专卖 编辑:程序博客网 时间:2024/06/14 04:24
class Resource implements Runnable { volatile public int i; volatile public Integer it; public Resource(int _i){ i = _i; it = new Integer(i); } public void run(){ while(true){ synchronized(it){ if(i > 0){ try{ Thread.sleep(200); } catch(Exception e){} i--; System.out.println(Thread.currentThread().getName() + " " + i); } else{ System.out.println(Thread.currentThread().getName()); break; } } } }}public class TestSecurity { public static void main(String[] args) { Resource m = new Resource(9); Thread t1 = new Thread(m); Thread t2 = new Thread(m); t1.start(); t2.start(); }}
0 0
- 4月16日,TestSecurity,每日20行。
- 6月16日,每日20行。
- 6月4日,每日20行。
- 3月16日,BoderLayoutDemo,每日20行。
- 4月20日,TestVector,每日20行。
- 4月4日,Decode,每日20行。
- 3月4日,simple_window,每日20行。
- 4月1日,StringEqualTest,每日20行。
- 4月2日,StringEqualTest1,每日20行。
- 4月3日,CharCode,每日20行。
- 4月5日,StringBufferPass,每日20行。
- 4月6日,StringBufferModify,每日20行。
- 4月7日,RemoveHZ,每日20行。
- 4月8日,DemogetProperties,每日20行。
- 4月9日,GetCurrentTime,每日20行。
- 4月10日,MyThread,每日20行。
- 4月11日,MyThread,每日20行。
- 4月12日,TestMyThread,每日20行。
- MySQL数据库的导入导出
- 作业2
- 鸡兔同笼[题目不难,提醒自己注意细节!!!]
- Unity3D学习(5)——牧师与魔鬼游戏
- UVA 815
- 4月16日,TestSecurity,每日20行。
- 前端面试题整理汇总(一)
- [AWDwR4]13章 Playtime1 的实现
- 文件操作之fgets()
- @RequestParam @RequestBody @PathVariable 等参数绑定注解详解
- Java技术——CopyOnWriteArrayList源码解析
- shodan 收索网络摄像头
- 启动活动的最佳写法
- like查询时索引优化