首页
外语
计算机
考研
公务员
职业资格
财经
工程
司法
医学
专升本
自考
实用职业技能
登录
计算机
3阅读下面程序 1 public class Try extends Thread{ 2 public static void main(String args[ ]){ 3 Try t = new Try(
3阅读下面程序 1 public class Try extends Thread{ 2 public static void main(String args[ ]){ 3 Try t = new Try(
admin
2010-07-28
28
问题
3阅读下面程序 1 public class Try extends Thread{ 2 public static void main(String args[ ]){ 3 Try t = new Try( ); 4 t.start( ); 5 } 6 7 public void run( int j){ 8 int i = 0; 9 while(i<5) { 10 System.out.pfintln("祝你成功"); 11 i++; 12 } 13 } 14 } 该程序要求打印5行“祝你成功”必须改正程序中的某行代码,程序才能完成。选择正确的修改是( )。
选项
A、将第1行的extends Thread改为implements Runnable
B、将第3行的new Try()改为new Thread()
C、将第4行t.sta.rt()改为start(t)
D、将第7行的publ void run(int j)改为public void run()
答案
8
解析
转载请注明原文地址:https://jikaoti.com/ti/sGH0FFFM
本试题收录于:
二级Java题库NCRE全国计算机二级分类
0
二级Java
NCRE全国计算机二级
相关试题推荐
数据的存储结构是指
下面叙述中错误的是
在软件开发中,需求分析阶段可以使用的工具是
下面不属于软件工程的3个要素是
有三个关系R、S和T如下:则由关系R和S得到关系T的操作是
有两个关系R和S如下:由关系R通过运算得到关系S,则所使用的运算为
下列关于二叉树的叙述中,正确的是
算法的空间复杂度是指
下列排序方法中,最坏情况下比较次数最少的是
PyInstaller库可以对程序打包,给定一个Python源程序文件a.py,图标文件为a.ico,将其打包为在Windows平台上带有上述图标的单一可执行文件,使用什么样的命令?
随机试题
选择样本时应注意()
下列是动脉粥样硬化易患因素的是
新生儿,胎龄35周,出生体重2000g,按新生儿分类应属于()。
患者男性,45岁。肛旁反复破溃流脓水近1年,查体见肛旁截石位10点距肛缘6cm处有一破口,诊断为肛瘘。其内口最可能的部位是()
初产妇,因第二产程延长,行左侧会阴切开+低位产钳助产,娩出4000g一活婴。产后2小时伤口疼痛,肛门坠胀并有便意,大便常规检验正常。体检:贫血貌,血压12/SkPa(90/60mmHg),左会阴稍肿,阴道出血不多。下列哪项诊断可能性最大
根据增值税法律制度的规定,一般纳税人取得的进项税额不得从销项税额中抵扣的有()。
在对H公司2005年度会计报表进行审计时,A注册会计师负责筹资与投资循环的审计。在审计过程中,A注册会计师遇到以下事项,请代为做出正确的专业判断。
当前我国金融深化可选择的正确途径是()。
外商投资旅行社,经审批,可以经营()。
当前中国改革的性质是社会主义经济体制的自我完善。()
最新回复
(
0
)