如果使用Thread t=new Test()语句创建一个线程,则下列叙述正确的是A
题型:单项选择题
问题:
如果使用Thread t=new Test()语句创建一个线程,则下列叙述正确的是
A.Test类一定要实现Runnable接口
B.Test类一定是Thread类的子类
C.Test类一定是Runnable类的子类
D.Test类一定是继承Thread类,并且实现Runnable接口
如果使用Thread t=new Test()语句创建一个线程,则下列叙述正确的是
A.Test类一定要实现Runnable接口
B.Test类一定是Thread类的子类
C.Test类一定是Runnable类的子类
D.Test类一定是继承Thread类,并且实现Runnable接口