线程的考题,谁给答案并解释?
1. class MyThread extends Thread {
2. public void run() { System.out.println(“AAA”); }
3. public void run(Runnable r) { System.out.println(“BBB”); }
4.
5. public static void main(String[] args) {
6. new Thread(new MyThread()).start();
7. }
8. }
What is the result?
A. AAA
B. BBB
C. Compilation fails.
D. The code runs with no output.