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

题目内容 (请给出正确答案)

执行下面程序后输出的正确结果是 public class Test{ public static void main(String args[]){ byte x=3,y=4; long r=80L; System.out.print(r/y); System.out.print(","); System.out.print(x/y); } }

A.20.0,1

B.20.0,1.0

C.20,0

D.20,1.0


参考答案

更多 “ 执行下面程序后输出的正确结果是 public class Test{ public static void main(String args[]){ byte x=3,y=4; long r=80L; System.out.print(r/y); System.out.print(","); System.out.print(x/y); } }A.20.0,1B.20.0,1.0C.20,0D.20,1.0 ” 相关考题
考题 若有如下程序:public class Test {public static void main (String[] args) {int x=20;if (x>10) System.out.print(x-=5);if (x>5) System.out.print(x--);}}则程序运行后的输出结果是【 】。

考题 下面程序的输出为( )。 public class Test { public static void main (String args[]) { int x,y; x=1; y=2; System.out.println("The output is"+x+y); } }A.The output is xyB.The output is 3C.The output is 12D.The output is x=1 y=2

考题 ( 16 )请阅读下面程序import java.io.*;public class TypeTransition {public static void main ( String args[] ){char a = 'a' ;int i = 100 ;long y = 456L ;int aa = a + i ;long yy = y-aa ;System.out.print ( "aa = "+aa ) ;System.out.print ( "yy = ” +yy ) ;}}程序运行结果是A ) as = 197 yy = 259B ) as=77 yy = 259C ) as = 543 yy = 288D ) as = 197 yy = 333

考题 阅读下面程序public class Test3{public static void main(String args[]){int x=3,y=4,z=5;String s= " xyz " ;System.out.println(s+x+y+z);}}程序运行的结果是A)xyz12B)xyz345C)xyzxyzD)12xyz

考题 执行下面程序段,屏幕上将输出( )。 public class Test { private int x=10,y=20; public Test (int x,int y) { System.out.println (x+this.x); System.out.println (y+y); } public static void main (String[] args) { Testt= new Test(30,50); } }A.无输出B.20 40C.40 100D.40 70

考题 下面程序的输出结果为( )。 public class Test { public static void main (String args[]) { String X="ABCD"; String Y="EFG"; X=X.substring (X.length()-Y.length()); System.out.println(X); } }A.ABCB.BCDC.EFGD.ABCDEFG

考题 执行下面程序后输出的正确结果是( )。 public class Test{ public static void main(String args[]){ System.out.print(100%3); System.out.print(","); System.out.print(100%0); } }A.1,1B.1,1.0C.1.0, lD.1.0,1.0

考题 下列程序的执行结果是( )。 public class Test { public static void main(String args[]) { byte y=4; long r=80L; System.out.println(r/y); } }A.20BB.20C.20D.编译错误

考题 阅读下面代码 public class Test2005 { public static void main(String args[]) { String s="Test"; switch(s) { case"Java":System.out.print("Java"); break; case"Language":System.out.print("Language"): break; case"Test":System.out.print("Test"); break; } } } 其运行结果是A.JavaB.LanguageC.TestD.编译出错

考题 执行下面程序后输出的正确结果是 public class Test{ public static void main(String args[]){ System.out.print(100%3); System.out.print(","); System.out.print(100%3.0); } }A.1,1B.1,1.0C.1.0,1D.1.0,1.0

考题 阅读下面程序 public class Test3 { public static void main(String[] args) { int x=3,y=4,z=5; String s="xyz": System.out.println(s+x+y+z); } } 程序运行的结果是A.xyz12B.xyz345C.xyzxyzD.12xyz

考题 下面程序片段的执行中,说法正确的是( )。 public class Test { public static void main (String args[]) { byte y=20; int i=y; int x=100; y=x; System.out.println(y); } }A.输出y的值为100B.第4行错误C.输出y的值为20D.第6行错误

考题 下列代码的执行结果是( )。 public class test3{ public static void main (string args[]){ System.out.print(100%3); System.out.print(","); System.out.println( 100%3.0); } }A.1,1B.1,1.0C.1.0,1D.1.0,1.0

考题 执行下面程序,显示的结果为( )。 public class Test { public static void main (String args[]) { Test t=newTest(); System.out.println (Loverload ("2","3")); } int overload (intx,int y) {return x+y;} String overload (String x,Stnng y){return x+y;} }A.2B.3C.5D.23

考题 阅读下列代码 public class Test { public static void main(String args[]) { String s = "Test"; switch (s) { case "Java": System.out.print("Java"); break; case "Language": System.out.print("Language"); break; case "Test": System.out.print("Test"); break; } } } 其运行结果是( )。A.JavaB.LanguageC.TestD.编译出错

考题 执行下面的程序后,输出的结果是______。 public class Test{ public static void main(String args[ ]){ byte x=3,y=4; long r=80L; System.out.print(r/y); System.out.print(","); System.out.print(x/y); } }A.20.0,1B.20.0,2.0C.20,0D.20,1.0

考题 下列程序的执行结果是( )。 public class Testii{ public static void main(String arg[]){ byte y=4; long r==80L: System.out.println(r/y): } }A.20BB.20C.20.0D.编译错误

考题 下列程序的执行结果是 public class Testii { public static void main(String args[ ]) { byte y=4; long r=80L; System.out.pfinfln(r/y); } }A.20 BB.20C.20D.编译错误

考题 下列程序执行之后,将输出 public class exl9 { public static void main(string[] args) { int x=3; int y=7; switch(y/x){ case 1: y*=2; break; case 2: y*=3; break; case 3: y*=4; break; default: y=0; } System.out.print(y); } }A.28B.21C.14D.0

考题 执行下面程序后输出的正确结果是( )。 publicclassTest{ publicstaticvoidmain(Stringargs[]){ bytex=3,y=4; longr=80L; System.out.print(r/y); System.out.print(","); System.out.print(x/y); } }A.20.0,1B.20.0,1.0C.20,0D.20,1.0

考题 执行下面程序后输出的正确结果是 public class Test{ public stoic void main (String args[]){ byte x=3, y=4; long r=80L; System.out.print(r/y); System.out.print(","); System.out.print(x/y); } }A.20.0, 1B.20.0, 1.0C.20,0D.20, 1.0

考题 执行下列程序段之后,输出的结果为______。 public class ex41 { public static void main(string[] args) { int x=15; byte y=1; x>>=y++; System.out.println(x); } }A.3B.7C.14D.10

考题 下面程序输出J的值为()public class Test{public static void main(String args[]){int i=276;byte j=(byte)i;System.out.print("i="+i);System.out.print("j="+j);}}A. i=276j=20B. i=276j=276C. i=20j=20D. 输出有错误

考题 public class X {  public static void main(String [] args) {  try {  badMethod();  System.out.print(“A”); }  catch (Exception ex) {  System.out.print(“B”);  }  finally {  System.out.print(“C”);  }  System.out.print(“D”);  }   public static void badMethod() {} }  What is the result?()  A、 ACB、 BDC、 ACDD、 ABCDE、 Compilation fails.

考题 class Passer {  static final int x = 5;  public static void main(String [] args) { new Passer().go(x);  System.out.print(x);  }  void go(int x) {  System.out.print(++x);  }  }  结果是什么?() A、55B、56C、65D、66

考题 public class X {  public static void main(String [] args) {  try {  badMethod();  System.out.print(“A”);  }  catch (Exception ex) {  System.out.print(“B”);  }  finally {  System.out.print(“C”);  }  System.out.print(“D”);  }  public static void badMethod() {  throw new RuntimeException();  }  }  What is the result? () A、 ABB、 BCC、 ABCD、 BCDE、 Compilation fails.

考题 单选题下列程序的运行结果是(  )。class Shape{ public Shape(){ System.out.print("Shape"); }}class Circle extends Shape{ public Circle(){ System.out.print("Circle"); }}public class Test{ public static void main(String[]args){ Shape d=new Circle(); }}A ShapeB CircleC ShapeCircleD 程序有错误