摘要: package com.chnfuture;class MyThread extends Thread{ MultiThread t = new MultiThread(); public void run(){ t.test(); System.out.println("Thread say:Hello,World!"); }}public class MultiThread { int x = 0; public synchronized void test(){ if(x==0) try{ w... 阅读全文
posted @ 2012-08-10 17:37 ligang305 阅读(114) 评论(0) 推荐(0) 编辑
摘要: View Code 1 package com.chnfuture; 2 3 public class MultiThread { 4 5 /** 6 * @param args 7 * @throws InterruptedException 8 */ 9 public static void main(String[] args) throws Exception {10 // TODO Auto-generated method stub11 R r = new R();12 new T... 阅读全文
posted @ 2012-08-10 16:32 ligang305 阅读(931) 评论(0) 推荐(0) 编辑
摘要: http://blog.csdn.net/axman/article/details/420890 阅读全文
posted @ 2012-08-10 15:36 ligang305 阅读(101) 评论(0) 推荐(0) 编辑