如果使用Thread t=new Test( )语句创建一个线程,则下列叙述正确的是

A:Test类一定要实现Runnable接口 B:Test类一定是Thread类的子类 C:Test类一定是Runnable类的子类 D:Test类一定是继承Thread类,并且实现Runnable接口

创建线程有两种方法,一种是继承线程类Thread,另一种是______。

A:建立实现Runnable接口的类 B:直接创建线程即可,无需实现任何接口 C:建立实现Collection接口的类 D:建立实现Thread接口的类

下列关于Thread类的说法中,错误的一项是______。

A:任何实现Runnable接口的对象都可以作为Thread类构造方法的target参数 B:name参数若为null,Java会给线程赋予一个惟一的名称 C:Thread类本身没有实现Runnable接口 D:当线程启动时,target参数表示的对象的run()方法将被调用

创建线程有两种方法,一种是继承线程类Thread,另一种是______。

A:建立实现Runnable接口的类 B:直接创建线程即可,无需实现任何接口 C:建立实现Collection接口的类 D:建立实现Thread接口的类

如果使用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接口

微信扫码获取答案解析
下载APP查看答案解析