标签:
package thread_test; class A implements Runnable { public void run() { while(true) { System.out.println("AA"); } } } class B implements Runnable { public void run() { while (true) { System.out.println("BB"); try { Thread.sleep(500); } catch(Exception e) {} } } } public class Thread_test { public static void main(String[] args) { Thread aa = new Thread(new A()); Thread bb = new Thread(new B()); //aa.start(); bb.start(); } }
标签:
原文地址:http://www.cnblogs.com/ghmgm/p/4345737.html