class MyThread implements Runnable
问题:
第一种:
MyThread a=new MyThread();
Thread A1=new Thread(a);
Thread A2=new Thread(a);
A1.start(); A2.start();
第二种:
MyThread a=new MyThread();
MyThread b=new MyThread();
Thread A1=new Thread(a);
Thread A2=new Thread(b);
A1.start(); A2.start();
请问这2种情况,运行结果不一样,它们本质的区别到底在哪里?
|
|