大家好,问大家个问题:
MyThread实现了Runnable的接口
下面的两段代码有什么不同啊
代码一
new Thread(new MyThread(),"A").start(); new Thread(new MyThread(),"B").start(); new Thread(new MyThread(),"C").start();
代码二 MyThread t = new Mythread();new Thread(t,"A").start();new Thread(t,"B").start();new Thread(t,"C").start();
|