标题: 线程终于入门了 [打印本页] 作者: 修身丶丶丶 时间: 2016-7-27 08:18 标题: 线程终于入门了 public class demo_Run {
public static void main(String[] args) {
demo01();
}
public static void demo01() {
new Thread(){
public void run(){
for (int i = 0; i < 1000; i++) {
System.out.println("aaaaaaaaaaaaaaaaaa");
}
}
}.start();
new Thread(new Runnable() {
@Override
public void run() {
// TODO Auto-generated method stub
for (int i = 0; i < 1000; i++) {
System.out.println("bb");
}
}
}).start();
for (int i = 0; i < 1000; i++) {
System.out.println("cccccccccccccccccccccccccccccccccccccccccccccccccccccccccc");
}
new Thread(new Runnable() {
@Override
public void run() {
// TODO Auto-generated method stub