单选题class Output { public static void main(String [] args) { int i = 4; System.out.print("3" + i + " "); System.out.print(i + 4 + "6"); System.out.println(i + "7"); } } 结果为()A7 8611B7 44647C34 8611D34 8647
单选题
class Output { public static void main(String [] args) { int i = 4; System.out.print("3" + i + " "); System.out.print(i + 4 + "6"); System.out.println(i + "7"); } } 结果为()
A
7 8611
B
7 44647
C
34 8611
D
34 8647
参考解析
解析:
暂无解析
相关考题:
执行下列程序段之后,输出的结果为______。public class exl0{public static void main(String[] args){int i=3;int j=7;int k=8;boolean b=j>i∧k!=i;System.out.println(b);}}
下面程序的输出结果是( )。 public class Sun { public static void main(String args[ ]) { int x=0; for(int i=1;i<=4;i++) { x=4; for(int j=1;j<=3;j++) { x=3; for(int k=1;k<=2;k++) { x-x+6; } } } System.out.println(x); } }A.7B.15C.157D.538
下列程序输出结果为( )。public class test { public static void main(String args[]) { int a=0; outer: for(int i=0;i<2;i++) { for(int j=0;j<2;j++) { if(j>i) { continue outer; } a++; } } System.out.println(a); }}A.0B.2C.3D.4
以下程序的输出结果为( )。 public class Main { public static void main(String[] args) { int i=0, j=0, a=6; if((++i>0)||(++j>0)) a++; System.out.println( "i=" +i+", j ="+j+", a="+A; } }A.i=0, j=0, a=6B.i=1, j=1, a=7C.i=1, j=0, a=7D.i=0, j=1, a=7
下列程序输出结果为( )。 public class test { public static void main (String args[]) { int a=0; outer:for(int i=0;i<2;i + +) { for(int j=0;j<2;j+ +) { if(j>i) { continue outer; } a+ +; } } System.out.println(a); } }A.0B.2C.3D.4
以下程序的运行结果为?class ValHold{public int i = 10;}public class ObParm{public static void main(String argv[]){ObParm o = new ObParm();o.amethod();}public void amethod(){int i = 99;ValHold v = new ValHold();v.i=30;another(v,i);System.out.print( v.i );}public void another(ValHold v, int i){i=0;v.i = 20;ValHold vh = new ValHold();v = vh;System.out.print(v.i);System.out.print(i);}}A.10030B. 20030C. 209930D. 10020
以下程序调试结果为:class Base{Base(){int i = 100;System.out.print (i);}}public class Pri extends Base{static int i = 200;public static void main(String argv[]){Pri p = new Pri();System.out.print(i);}} A.编译错误B.200C.100200D.100
程序: class TestApp{ public static void main(String[] args){ for(int i=0;i5;i++) System.out.print(i+1); System.out.println(i); } } 上述程序运行后的结果是哪项?() A、 123456B、 123455C、 123450D、 编译错误
public class TestApp{ public static void main(String[] args){ try{ int i = 0; int j = 1 / i; System.out.println(“1”); } catch(Exception e){ System.out.print(“3”); } finally{ System.out.print(“4”); } } } 上述程序运行后的输出是哪项?() A、 4B、 34C、 43D、 14
public class Alpha{ private static Character() ids; public static void main( String[] args){ ids = new Character[args.length]; for (int i=0; iids[i] = new Character( args[i] ); System.out.print( ids[i] ); } } } What is correct?() A、 Compilation fails.B、 The code runs with no output.C、 An exception is thrown at runtime.D、 The code runs, outputing a concatenated list of the arguments passed to the program.
class TestApp{ public static void main (String[ ] args){ for(int i=0;i10;i++){ if(i==3) break; System.out.print (i); } } } 程序运行后的输出是哪项?() A、0123B、012C、0123456789D、012456789
程序: class TestApp{ int i public static void main(String[] args){ for(int i=0;i5;i++) System.out.print(i+1); System.out.println(i); (i没有定义) } } 上述程序运行后的结果是哪项?()A、 123456B、 123455C、 123450D、 编译错误
class Output{ public static void main(String[] args){ int i=4; System.out.print("3"+i+" "); System.out.print(i+4+"6"); System.out.println(i+"7"); } } 结果为:() A、7 8611B、7 44647C、34 8611D、34 8647E、34 44611F、34 44647
class Output { public static void main(String [] args) { int i = 4; System.out.print("3" + i + " "); System.out.print(i + 4 + "6"); System.out.println(i + "7"); } } 结果为() A、7 8611B、7 44647C、34 8611D、34 8647
public class Test { public static void main(String args[]) { class Foo { public int i = 3; } Object o = (Object)new Foo(); Foo foo = (Foo)o; System.out.println(“i = “ + foo.i); } } What is the result?() A、 i = 3B、 Compilation fails.C、 A ClassCastException is thrown at line 6.D、 A ClassCastException is thrown at line 7.
1) class Person { 2) public void printValue(int i, int j) {/*…*/ } 3) public void printValue(int i){/*...*/ } 4) } 5) public class Teacher extends Person { 6) public void printValue() {/*...*/ } 7) public void printValue(int i) {/*...*/} 8) public static void main(String args[]){ 9) Person t = new Teacher(); 10) t.printValue(10); 11) } 12) } Which method will the statement on line 10 call? () A、 on line 2B、 on line 3C、 on line 6D、 on line 7
现有: class Output { public static void main (String[] args) { int i=5: System.out.print( "4"+i+""); System.out.print (i+5+"7"); System.out.println (i+"8"); } } 结果为:() A、 99722B、 955758C、 4510758D、 459722
单选题public class TestApp{ public static void main(String[] args){ try{ int i = 0; int j = 1 / i; System.out.println(“1”); }catch(Exception e){ System.out.print(“3”); }finally{ System.out.print(“4”); } } } 上述程序运行后的输出是哪项?()A 4B 34C 43D 14
单选题1) class Person { 2) public void printValue(int i, int j) {/*…*/ } 3) public void printValue(int i){/*...*/ } 4) } 5) public class Teacher extends Person { 6) public void printValue() {/*...*/ } 7) public void printValue(int i) {/*...*/} 8) public static void main(String args[]){ 9) Person t = new Teacher(); 10) t.printValue(10); 11) } 12) } Which method will the statement on line 10 call? ()A on line 2B on line 3C on line 6D on line 7
单选题class Output{ public static void main(String[] args){ int i=4; System.out.print("3"+i+" "); System.out.print(i+4+"6"); System.out.println(i+"7"); } } 结果为:()A7 8611B7 44647C34 8611D34 8647E34 44611F34 44647
单选题public class Alpha{ private static Character() ids; public static void main( String[] args){ ids = new Character[args.length]; for (int i=0; iids[i] = new Character( args[i] ); System.out.print( ids[i] ); } } } What is correct?()A Compilation fails.B The code runs with no output.C An exception is thrown at runtime.D The code runs, outputing a concatenated list of the arguments passed to the program.
单选题程序: class TestApp{ int i public static void main(String[] args){ for(int i=0;i5;i++) System.out.print(i+1); System.out.println(i); (i没有定义) } } 上述程序运行后的结果是哪项?()A 123456B 123455C 123450D 编译错误
单选题class TestApp{ public static void main (String[ ] args){ for(int i=0;i10;i++){ if(i==3) break; System.out.print (i); } } } 程序运行后的输出是哪项?()A0123B012C0123456789D012456789
单选题程序: class TestApp{ public static void main(String[] args){ for(int i=0;i5;i++) System.out.print(i+1); System.out.println(i); } } 上述程序运行后的结果是哪项?()A 123456B 123455C 123450D 编译错误
单选题class Output { public static void main(String [] args) { int i = 4; System.out.print("3" + i + " "); System.out.print(i + 4 + "6"); System.out.println(i + "7"); } } 结果为()A7 8611B7 44647C34 8611D34 8647
单选题现有: class Output { public static void main (String[] args) { int i=5: System.out.print( "4"+i+""); System.out.print (i+5+"7"); System.out.println (i+"8"); } } 结果为:()A 99722B 955758C 4510758D 459722
单选题下列程序的运行结果是( )。public class ArrayTest{public static void main(String[] args){ int data[][]={{1,2,3,4,5},{11,22,33,44,55},{111,222,333,444,555}}; for(int i=0;i if(i%2==0)System.out.print(data[i][4]);}}}A5555B555C555D55
单选题下列程序的运行结果是( )。 public class Test{ public static void main(String[]args){ float i=3.0f; int n=10; System.out.print(i++); System.out.println(“,”+n*i++); } }A4.0,36.0B3.0,40.0C3.0,36.0D4.0,40.0