如下代码创建一个新线启动线程: Runnable target=new MyRunnable(); Thread myThread=new Thread(target); 以下哪个类可以创建target对象,并能编译正确
A.
public class MyRunnable extends Runnable { public void run(){} }
B.
public class MyRunnable implements Runnable {public void run() {}}
C.
public class MyRunnable extends Runnable {void run() {}}
D.
public class MyRunnable implements Runnable {void run() {}}