注意: 如果 是利用实现Runnable 接口来开启一个线程,那么实现是通过 创建线程对象,然后将线程对象抛到new Thread 这个类中,然后来调用start方法
package com.yyf.Thread;
public class TestThread3 implements Runnable{
@Override
public void run() {
for (int i=1;i <100;i++){
System.out.println ("11111111111--"+i);
}
}
public static void main(String[] args) {
TestThread1 t = new TestThread1 ();
new Thread (t).start ();
for (int j=1;j<=200;j++){
System.out.println ("cb----"+j);
}
}
}