首页
外语
计算机
考研
公务员
职业资格
财经
工程
司法
医学
专升本
自考
实用职业技能
登录
计算机
阅读下面程序 public class Test implements Runnable{ public static void main(String[]args){ __________________
阅读下面程序 public class Test implements Runnable{ public static void main(String[]args){ __________________
admin
2009-08-24
22
问题
阅读下面程序 public class Test implements Runnable{ public static void main(String[]args){ _______________________________________; t. start(); } public void mR(){ System. out. println("Hello!"); }} 在程序下画线处填入正确选项是
选项
A、Test t=flew Test()
B、Thread t=new Thread();
C、Thread t=new Thread(new Test());
D、Test t=new Thread();
答案
C
解析
根据t. start()可知t应该是一个Thread类,排除A)。Thread类与Test类之间没有继承关系,所以排除D)。B)没有指定创建线程的对象,因此t. start()语句不能使Test类的run方法运行。所以选C)。
转载请注明原文地址:https://jikaoti.com/ti/Bob0FFFM
本试题收录于:
二级Java题库NCRE全国计算机二级分类
0
二级Java
NCRE全国计算机二级
相关试题推荐
下面不属于需求分析阶段任务的是
下面不属于软件工程过程的4种基本活动
SQL语句中删除视图的命令是
下列选项中不属于结构化程序设计原则的是
关于视图和查询,以下叙述正确的是
从内存中清除内存变量的命令是
假定一个表单里有一个文本框Text1和一个命令按钮组CommandGroup1。命令按钮组是一个容器对象,其中包含Command1和Command2两个命令按钮。如果要在Command1命令按钮的某个方法中访问文本框的Value属性值,不正确的表达式是
某二叉树共有12个结点,其中叶子结点只有1个。则该二叉树的深度为(根结点在第l层)
如果进栈序列为A,B,C,D,则可能的出栈序列是()。
在表单设计中,经常会用到一些特定的关键字、属性和事件,下列各项中属于属性的是()。
随机试题
根据现行建筑安装工程费用构成的有关规定,下列不属于建筑安装工程直接费中人工费的是()。
我国的城乡规划行政体系构成是()。
通过减少企业业务流程的偏差,使组织的绩效提升到更高的水平的绩效改进方法是()。
市场工资率的变动给劳动者带来的是两个作用方向()的影响—收入效应和替代效应。
某企业为增值税一般纳税人,2016年9月经营状况如下:(1)生产食用酒精一批,将其中的50%用于销售,开具的增值税专用发票注明金额10万元、税额1.7万元。(2)将剩余50%的食用酒精作为酒基,加入食品添加剂调制成38度的配制酒,当月全部销售,开具
2020年1月12日,中国人民解放军海军055型驱逐舰首舰南昌舰归建入列仪式在青岛某军港码头举行。关于南昌舰,下列说法不正确的是()。
根据我国《宪法》和《选举法》的规定,下列选项表述正确的有()。
"Whyarehumanssosmart?"isaquestionthatfascinatesscientists.TadeuszKawecki,anevolutionarybiologistattheUniversit
Withtherapidspreadoftheinterneteverywhereintheworld,andthe【C1】______numberofusers,oneofthemostexcitingdevel
A、Yes,itis.B、It’sperfect.C、Idon’tlikeit.D、No,itisn’t.C题目意为“我喜欢中餐,你呢?”只有选项C“我不喜欢。”明确表明了态度,故选C。
最新回复
(
0
)