标签:
2016-07-01
package com.java1995; public class RunnableDemo { public static void main(String[] args) { MyThread mt=new MyThread(); Thread t=new Thread(mt); t.start(); for(int i=0;i<10;i++){ try { Thread.sleep(100); } catch (InterruptedException e) { // TODO Auto-generated catch block e.printStackTrace(); } System.out.println("主线程"+i); } } }
package com.java1995; public class RunnableDemo { public static void main(String[] args) { MyThread mt=new MyThread(); Thread t=new Thread(mt); t.start(); for(int i=0;i<10;i++){ try { Thread.sleep(100); } catch (InterruptedException e) { // TODO Auto-generated catch block e.printStackTrace(); } System.out.println("主线程"+i); } } }
标签:
原文地址:http://www.cnblogs.com/cenliang/p/5634265.html