网友您好, 请在下方输入框内输入要搜索的题目:

题目内容 (请给出正确答案)
下面程序段的输出结果为( )。 A.a=100 b=200 a=12 b=4B.a=12 b=45 5a=100 b=200SXB

下面程序段的输出结果为( )。

A.a=100 b=200 a=12 b=4

B.a=12 b=45 5a=100 b=200

C.a=12 b=200 a=100 b=45

D.a=100 b=45 a=12 b=200


参考答案

更多 “ 下面程序段的输出结果为( )。 A.a=100 b=200 a=12 b=4B.a=12 b=45 5a=100 b=200SXB 下面程序段的输出结果为( )。A.a=100 b=200 a=12 b=4B.a=12 b=45 5a=100 b=200C.a=12 b=200 a=100 b=45D.a=100 b=45 a=12 b=200 ” 相关考题
考题 下面程序段的输出结果为 public class Test { int a,b; Test() { a=100; b=200; } Test(int x,int y) { a=x; b=y; } public static void main(String args[]) { Test bjl=new Test(12,45); System.out.println("a="+objl.a+" b="+Objl.B); Test Obj2=new Test(); System.out.println("a="+Obj2.a+" b="+Obj2.B); } }A.a=100 b=200 a=12 b=45B.a=12 b=45 a=100 b=200C.a=12 b=200 a=100 b=45D.a=100 b=45 a=12 b=200

考题 下面程序段的输出结果为 public class Test { int a,b; Test() { a=100; b=200; } Test(int x,int y) { a=x; b=y; } public static void main(String args[]) { Test Obj1=new Test(12,45); System.out.println(”a=”+Obj 1.a+” b=”+Obj 1.b); Test Obj2=new Test(); System.out.println(”a=”+Obj 2.a+” b=”+Obj 2.b); } }A.a=100 b=200 a=12 b=45B.a=12 b=45 a=100 b=200C.a=12 b=200 a=100 b=45D.a=100 b=45 a=12 b=200

考题 下面程序段的输出结果为( )。 publicclass Test { int a,b; Test() { a=100; b=200; } Test(intx,inty) { a=X; b=y; } publicstaticvoidmain(Stringargs[]) { TestObj1=newTest(12,45); System.out.println("a="+Obj1.a+" b="+Obj1.b); TestObj2=newTest(); System.out.println("a="+Obj2.a+"b="+Obj2.b); } }A.a=100b=200 a=12 b=45B.a=12 b=45 a=100b=200C.a=12 b=200 a=100b=45D.a=100b=45 a=12 b=200

考题 下列程序段的输出结果是______。 public class Test{ int a,b; Test( ){ a=100; b=200; } Test(int x,int y){ a=X; b=y; } public static void main(String args[ ]){ Test Obj1=new Test(12,45); System.out.println("a="+Obj1.a+"b="+Obj1.B); Test Obj2=new Test( ); System.out.println("a="+Obj1.a+"b="+Obj1.B); } }A.a=100 b=200 a=12 b=45B.a=12 b=45 a=100 b=200C.a=12 b=200 a=100 b=45D.a=100 b=45 a=12 b=200

考题 下面程序段的输出结果为( )。 public class Test { int a,b; Test { a=100; b=200: } Test(int X,int y) { a=x: b=y; } public static void main(String args[]) { Test bjl=new Test(12,45); System.OUt.println("a="+Objl.a+"b="+Objl. b); Test Obj2=new Test; System.out.println("fl="+Obj2.a+"b="+Obj2. b); } }A.a=100 b=200 a=12 b=45B.a=12 b=45a=100 b=200C.a=12 b=200 a=100 b=45D.a=100 b=45 a=12 b=200

考题 3下面程序段的输出结果为( )。public class Test{ int a, b; Test() { a=100; b=200; } Test(int x, int y) { a=x; b=y; } public static void main(String args[]) { Test Obj 1 = new Test(12,45 ); System.out.println("a="+Obja+" b="+Objb); Test Obj2 = new Test(); System.out.println("a="+Obja+" b="+Objb); }}A.a=100 b=200 a=12 b=45B.a=12 b=45 a=100 b=200C.a=12 b=200 a=100 b=45D.a=100 b=45 a=12 b=200

考题 有如下程序 public class Test { int a,b; Test ( ) { a = 100; b = 200; } Test(int x, int y) { a = x; b = y; } public static void main(String args[]) { Test Obj1 = new Test(12,45); System.out.println("a = "Obj1.a+" b = "+ObB) ; Test Obj1 = new Test(); System.out.println("a = "Obj1.a+" b = "+Obj1.B) ; } } 程序的运行结果为( )。A.a=100 b=200 a=12 b=45B.a=12 b=45 a=100 b=200C.a=12 b=200 a=100 b=45D.a=100 b=45 a=12 b=200

考题 下面程序段的输出结果为 public class Test { int a, b; Test() { a=100; b=200; } Test(int x,int y) { a=x; b=y; } public static void main(String args[]) { Test Obj1=new Test(12,45); System.out.println("a=+Obj1.a+" b="+Obj1.B) ; Test Obj2=new Test(); System.out.println("="+Obja+" b="+ObjB) ; } }A.a=100 b=200 a=12 b=45B.a=12 b=45 a=100 b=200C.a=12 b=200 a=100 b=45D.a=100 b=45 a=12 b=200

考题 若以定义 int=12;执行下面程序的输出结果为___. Printf(“a=%d,a=%o,a=%xn”a,a,a);A.a=12,a=14,a=cB.a=12,a=14,a=aC.a=12,a=16,a=cD.a=12,a=14,a=c