网友您好, 请在下方输入框内输入要搜索的题目:
题目内容
(请给出正确答案)
publicclassTest{12.publicvoidfoo(){13.assertfalse;14.assertfalse;15.}16.publicvoidbar(){17.while(true){18.assertfalse;19.}20.assertfalse;21.}22.}Whatcausescompilationtofail?()
A.Line13
B.Line14
C.Line18
D.Line20
参考答案
更多 “ publicclassTest{12.publicvoidfoo(){13.assertfalse;14.assertfalse;15.}16.publicvoidbar(){17.while(true){18.assertfalse;19.}20.assertfalse;21.}22.}Whatcausescompilationtofail?() A.Line13B.Line14C.Line18D.Line20 ” 相关考题
考题
下面程序执行后,输出的结果是( )。 public class Test { public static void main (String[] )args) { boolean m=true; if(m==false) System.out.println("假"); else if(m====true) System.out.println("真"); else System.out.println ("错误"); } }A.真B.假C.错误D.编译出错
考题
publicclassTest{publicstaticvoidmain(String[]args){booleanassert=true;if(assert){System.out.println(”assertistrue”);}}}Given:javac-source1.3Test.javaWhatistheresult?()
A.Compilationfails.B.Compilationsucceedswitherrors.C.Compilationsucceedswithwarnings.D.Compilationsucceedswithoutwarningsorerrors.
考题
classAimplementsRunnable(2.inti;3.publicvoidrun()(4.try(5.thread.sleep(5000);6.i=10;7.)catch(InterruptedExceptione){}8.)9.)10.11.publicclassTest{12.publicstaticvoidmain(stringargs[])(13.try(14.Aa=newA();15.Threadt=newThread(a);16.t.start();17.18.intj=a.i;19.20.)catch(Exceptione){}21.)22.}Whichstatementalline17willensurethatj=10atline19?()
考题
publicclassTest{publicstaticvoidmain(String[]argv){//insertstatementhere}}Whichstatement,insertedatline3,producesthefollowingoutput?()Exceptioninthreadmain”java.lang.AssertionError:trueatTest.main(Test.java:3)A.asserttrue;B.assertfalse;C.assertfalse:true;D.assertfalse==true;E.assertfalse:false;
考题
classAimplementsrunable(2.int&ensp
1.classAimplementsrunable(2.inti;3.publicvoidrun()(4.try(5.thread.sleep(5000);6.i=10;7.)catch(InterruptedExceptione){}8.)9.)10.11.publicclassTest{12.publicstaticvoidmain(stringargs)(13.try(14.Aa=newA();15.Threadt=newThread(a);16.t.start();17.18.intj=a.i;19.20.)catch(Exceptione){}21.)22.)Whichstatementalline17willensurethatj=10atline19?()
考题
下列语句输出结果为( )。 public class test { public static void main (String args[]) { int x=10,y=9; boolean b=true; System.out.println(x<y||!b); } }A.真B.假C.1D.0
考题
下列代码的执行结果是( )。 public class Test{ public static void main String args[]){ String s1=new String("welcome"); String s2=new String("welcome"); System.out.println(s1==s2); System.out.println(s1.equals(s2)); } }A.false,falseB.false,trueC.true,trueD.true,false
考题
下列程序段的输出是( )。 public class Test { public static void main (String args[ ]) { String ss1 = new String("hello"); String ss2 = new String("hello"); System.out.println(ssl == ss2); System.out.println (ssequals(ss2)); } }A.true, falseB.true, trueC.false, trueD.false, false
考题
二、指出下列短语的结构类型 1.油盐酱醋 2.又气又急 3.我上学的时候 4.来一下 5.中华的腾飞 6.中华腾飞 7.她抚顺人 8.问题的产生 9.美妙的渲染 10.住一年 11.买二斤 12.从哪里来 13.你们三位 14.派你们当代表 15.希望你当代表 16.借书看 17.长城内外 18.当我上学的时候 19.新年的 20.去北京 21.所需要 22.所需要的 23.暴风雨般的掌声 24.上街买东西 25.读书写字
热门标签
最新试卷