摘要: 开门见山看例子,下面是本人学习过程中在网上看到的一段代码及解释class TestSynchronized extends Thread {public TestSynchronized(String name) {super(name);}public synchronized static void prt() {for (int i = 10; i < 20; i++) {System.out.println(Thread.currentThread().getName() + " : " + i);try {Thread.sleep(100);} catch 阅读全文
posted @ 2013-02-17 10:57 晓东0 阅读(449) 评论(0) 推荐(0)