网友您好, 请在下方输入框内输入要搜索的题目:
题目内容
(请给出正确答案)
publicclasstest(2.publicstaticvoidmain(Stringargs[]){3.inti=0xFFFFFFF1;4.intj=~i;5.6.}7.)Whatisthedecimalvalueofjatline5?()
A.0
B.1
C.14
D.–15
E.Anerroratline3causescompilationtofail.
F.Anerroratline4causescompilationtofail.
参考答案
更多 “ publicclasstest(2.publicstaticvoidmain(Stringargs[]){3.inti=0xFFFFFFF1;4.intj=~i;5.6.}7.)Whatisthedecimalvalueofjatline5?() A.0B.1C.14D.–15E.Anerroratline3causescompilationtofail.F.Anerroratline4causescompilationtofail. ” 相关考题
考题
publicclassForBar{2.publicstaticvoidmain(String[]args){3.inti=0,j=5;4.tp:for(;;){5.i++;6.for(;;)7.if(i--j)breaktp;8.}9.system.out.printIn(i=”+i+,j=+j);10.}11.}Whatistheresult?()
A.Theprogramrunsandprints“i=1,j=0”B.Theprogramrunsandprints“i=1,j=4”C.Theprogramrunsandprints“i=3,j=4”D.Theprogramrunsandprints“i=3,j=0”E.Anerroratline4causescompilationtofail.F.Anerroratline7causescompilationtofail.
考题
publicclassTest{2.publicstaticvoidmain(Stringargs[]){3.classFoo{4.publicinti=3;5.}6.Objecto=(Object)newFoo();7.Foofoo=(Foo)o;8.System.out.printIn(foo.i);9.}10.}Whatistheresult?()
A.Compilationwillfail.B.Compilationwillsucceedandtheprogramwillprint“3”C.CompilationwillsucceedbuttheprogramwillthrowaClassCastExceptionatline6.D.CompilationwillsucceedbuttheprogramwillthrowaClassCastExceptionatline7.
考题
publicclassTest{2.publicstaticvoidmain(String[]args){3.unsignedbyteb=0;4.b--;5.6.}7.}Whatisthevalueofbatline5?()
A.-1B.255C.127D.Compilationwillfail.E.Compilationwillsucceedbuttheprogramwillthrowanexceptionatline4.
考题
publicclasstest(2.publicstaticvoidmain(stringargs[]){3.int1=0;4.while(i){5.if(i==4){6.break;7.}8.++i;9.}10.11.}12.)Whatisthevalueofiatline10?()
A.0B.3C.4D.5E.Thecodewillnotcompile.
考题
publicclassTest{2.publicstaticvoidmain(Stringargs){3.unsignedbyteb=0;4.b--;5.6.}7.}Whatisthevalueofbatline5?()
A.-1B.255C.127D.Compilationwillfail.E.Compilationwillsucceedbuttheprogramwillthrowanexceptionatline4.
考题
publicclasstest(publicstaticvoidmain(stringargs){int1=0;while(i){if(i==4){break;}++i;}})Whatisthevalueofiatline10?()
A.0B.3C.4D.5E.Thecodewillnotcompile.
考题
下面代码的运行结果是 public class Test{ public static void main(String args[]){ for(int i=0; i<3;i++){ if(i<2) continue; System.out.println(i); } } }A.0B.1C.2D.3
考题
执行下面程序后,结果是 public class Testrr { public static void main(String args[]){ int i=0xFFFFFFF1; int j=-i; System.out.println("j="+j); } }A.j=-15B.j=-16C.j=16D.j=15
考题
下面代码的运行结果是 public class Test{ public static void main(String args[]){ for(int i 0;i<3;i++){ if(i<2) continue; System.out.println(i); } } }A.0B.1C.2D.3
热门标签
最新试卷