求教一个关于线程的问题
public class A {public static void main(String[] arg){
Runnable r = new Runnable(){
public void run(){
System.out.println("cat");
}
};
Thread t = new Thread(r){
public void run(){
System.out.println("dog");
}
};
t.start();
}
}
希望前辈能够解释一下这道题的原理
感激不尽~~~