网友您好, 请在下方输入框内输入要搜索的题目:
题目内容
(请给出正确答案)
publicclassTest{2.publicstaticvoidmain(Stringargs){3.unsignedbyteb=0;4.b--;5.6.}7.}Whatisthevalueofbatline5?()
A.-1
B.255
C.127
D.Compilationwillfail.
E.Compilationwillsucceedbuttheprogramwillthrowanexceptionatline4.
参考答案
更多 “ publicclassTest{2.publicstaticvoidmain(Stringargs){3.unsignedbyteb=0;4.b--;5.6.}7.}Whatisthevalueofbatline5?() A.-1B.255C.127D.Compilationwillfail.E.Compilationwillsucceedbuttheprogramwillthrowanexceptionatline4. ” 相关考题
考题
阅读下列代码 public class Test 2005{ public static void main(String args[]){ System.out.println(~(0xa5)0xaA.0xa5B.10C.0x50D.0xaa
考题
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.inti=0xFFFFFFF1;4.intj=~i;5.6.}7.)Whatisthedecimalvalueofjatline5?()
A.0B.1C.14D.–15E.Anerroratline3causescompilationtofail.F.Anerroratline4causescompilationtofail.
考题
publicclassTest{privatestaticfloat[]f=newfloat[2];publicstaticvoidmain(Stringargs[]){System.out.println(f[0]=+f[0]);}}Whatistheresult?()
A.f[0]=0B.f[0]=0.0C.Compilationfails.D.Anexceptionisthrownatruntime.
考题
1.classExc0extendsException{}2.classExc1extendsExc0{}3.publicclassTest{4.publicstaticvoidmain(Stringargs[]){5.try{6.thrownewExc1();7.}catch(Exc0e0){8.System.out.println(Ex0caught”);9.}catch(Exceptione){10.System.out.println(exceptioncaught”);11.}12.}13.}Whatistheresult?()A.Ex0caughtB.exceptioncaughtC.Compilationfailsbecauseofanerroratline2.D.Compilationfailsbecauseofanerroratline6.
考题
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[]) {int m=0;for ( int k=0;k
A. 000B. 012C.123D.111
热门标签
最新试卷