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=20
B. i=276j=276
C. i=20j=20
D. 输出有错误
[单选题]下列程序输出结果为( )。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 Test{ public static void main(String args[]){ int x,y; x=(int)Math.sqrt(5)/2+(int)Math.random()*5/2; y=(int)Math.sqrt(3)/2+(int)Math.random()*3/2; if(x>y) System.out.println("x>y"); else if(x==y) System.out.println("x=y")
[单选题]下面程序段的输出结果是 public class Test { public static void main (String args[]){ int[] a=new int[11]; int[] p=new int [4]; int k=5; for(int i=1;i<=10;i++) a[i]=i; for(int i=1;i<=3;i++) p[i]=a[i*i]; for(int i=1;i<=3;i++) k=k+p[i]*2; System.out.println(k); } }
[单选题]下列语句输出结果为( )。 public class test { public static void main(StringArgsl[]) { String s1=new String("How"); String s2=new String("How"); System.out.println(!(s1==s2)); } }A.falseB.trueC.1D.0
[单选题]下列语句输出结果为( )。public class test{public static void main(String args []){String s1=new String("How");String s2=new String("How");System.out.println(!(s1 ==s2));}A.falseB.trueC.1D.0
[单选题]下列语句输出结果为( )。public class test{public static void main(String args[]){byte b=OXA;System.out.println(b);}}A.OXAB.AC.1D.10
[单选题]下面程序段的输出结果是______。 class Test{ public static void main(String args[ ]){ MyThread t=new MyThread( ); t.displayOutput("t has been created"); t.start( ); } } class MyThread extends Thread{ public void display Output(String s){ System.out,println(s); }
[单选题]下面程序的输出为( )。 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
[单选题]下面程序的输出结果为( )。 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[]) { boolean a,b,c; a=(3<5); b=(a==true); System.out.println("a="+a+"b="+B); c=(b==false); System.out.println("b="+b+"c="+C); } }A.a=true b=false b=true c=falseB.a=true b=fal