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

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

下面程序的输出结果是什么? public class cs6 { public static void main(String args[]) { int i =1; int j =10; do{ if(i++<j--) continue; }while(i<5); System.out.println(i+","+j); } }


参考答案和解析
D
更多 “下面程序的输出结果是什么? public class cs6 { public static void main(String args[]) { int i =1; int j =10; do{ if(i++<j--) continue; }while(i<5); System.out.println(i+","+j); } }” 相关考题
考题 以下代码的运行结果是______。public class exl5{public static void main(String args []){int i = 5;do{i--;if(i > 2)continue;}while(i < 0);System.out.println(i);}}

考题 执行下列程序段之后,输出的结果为______。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 c3 { public static void main(String args[]) { int i=13, j=10; if(i-->j) i++; else j--; System.out.println(i+"\t"+j); } }A.13 10B.12 11C.11 11D.12 12

考题 下面程序的输出结果是( )。 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 exl6{public static void main(String[] args){int i;int a[] = new int[10];for(i = O; i < a.length; i++)a[i] = i * 10 + j;for(i = 1; i < a.length; i++)if(a[i]%5 == O)System,out.println(a[i]);}}

考题 请阅读下面程序public class Test {public static void main (String[] args) {int i,j;for (i=1;i<5;i++) {for (j=1;j<=i;j++)system.out.print (i+"X"+j+"="+i*j+" ");System.out.println();}}}程序执行完后,i循环和j循环执行的次数分别是【 】。

考题 下面程序的输出结果是什么? class C1{ static int j=0; public void method(int a){ j++; } } class Test extends C1{ public int method(){ return j++; } public void result(){ method(j); System.out.println(j+method()); } public static void main(String args[]){ new TeA.0B.1C.2D.3

考题 下面程序的输出结果是什么? class Happy { public static void main(String args[]) { int i =1; int j = 10; do { if ( i++ A.5 5B.5 4C.6 4D.5 6

考题 下列程序中,分别计算1,2,3......,10的阶乘,并输出计算结果,请将程序补充完整。程序运行结果如下:1!=12!=23!=64!=245!=1206!=7207!=50408!=403209!=36288010!=3628800public class ex10_1 {public static void main(String[]args) {long 1 Factorial;for(int i=1;i<=10;i++) {_____________;for(int j=2;___________;j++)_____________;System.out.println(i+ " ! =" + 1Factorial);}}}

考题 下面语句执行后,i的值是______。 public class Test11 { public static void main(String[] args) { int i=0; for( int j=10; j>5i<5; j-=3,i+=2 ) { i=i+j; } System.out.println (i); } }A.10B.9C.8D.12

考题 下面程序段的输出结果是( )。 public class Test { public static void main (String[] args) { int j=2,i=5; while (j<i--) j++; System.out.println(j);} }A.2B.3C.4D.5

考题 下列程序执行后的结果是______。public class ex24{public static void main(String[] args){int j=10;a1: for(int i=3;i>0;i--){j-=i;int m=l;a2: while (m<j){if (i<=m)continue a1;j/=m++;}}System.out.println(j);}}下列嵌套的循环程序执行后,结果是______。 public class ax25 { public static void main(String[] args) { int sum=0; for(int i=0;i<=5;i++) { for(int j=10;j>3*i;j--) { sum+=j*i; } } System.out.println(sum); } }A.136B.127C.147D.153

考题 有下面程序段: Public class ArrayTest { Public static void main(String args[]) { int[] intArray=new int[3]; for(int I=0;I<3;I++) { intArray[I]=I+2; System.out.println("IntArray["+I+"]"="+intArray[I]); } System.out.println("--------------"); Int arrLen=4; IntArray=new int[arrLen]; For(int j=intArray.length;j>=0;j--) { intArray[j]=j*3; System.out.println("hello"+intArray[j]); } } } 则运行的结果是( )。A.编译出错B.编译通过,但运行出错C.可以运行,但有错误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

考题 控制台应用程序 example.java 如下:public class example{public static void main(String[] args){int i=0, j=9;do{if(i++--j) break;} while(i4);System.out.println("i="+i+" and j="+j);}}

考题 以下程序的输出结果为( )。 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 c3 { public static void main(String args[]) { int i=13,j=10; if(i--j) i++: elsej--; System.out.println(i+"\t"+j); } }A.13 10B.12 11C.11 11D.12 12

考题 下列程序的输出结果是( )。 public class ArrayTest { public static void main(String args[]) { int[]intArray=new int[3] for(int i=0;i3;i++) { intArray[i]=i+2: system.out.println("lntArray["+i+"]¨= intArray[i]); } System.out.println("----------"); int arrlen=4: IntArray=new int[arrLen]; For(int j=intArray.length;j=0;j--) { intArray[j]=j*3; system.out.println("hello"+intArray[j]); } } }A.编译未通过B.编译通过,但运行错误C.可以运行,但有错误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 Sun { public static void main(String args[]) { int[] a={1,2,3,4); int j=1,s=0; for(int i=3;i>=0;i--) { s=s+a[i]*j; j=j*10; } System.out.println(s); } }A.1234B.21C.43D.4321

考题 下列程序的执行结果为( )。 public class c3 { public static void main (String args[]) { int i=13,j=10; if (i-->j) i++; else j--; System. out.println (i+"\t"+j); } }A.13 10B.12 11C.11 11D.12 12

考题 下列语句执行后,i的值是( )。 public class Test { public static void main(String[ ] args) { int i =0; for(int j=10; j>5i<5; j-=3,i+=2) i=i+j; System.out.println(i); } }A.8B.9C.10D.12

考题 下列的程序的功能是求2~100之间的素数,程序中划线部分应填入的选项是 public class Testnn { public static void main(String args[]) { Labell: for(int i=2;i100;i++) { for(int j=2;j<i;j++) { if(i%j==______)continue Labell; } System.out.println(i); } } }A.0B.1C.iD.j

考题 下列程序运行后的输出结果是( )。 public class Sun { public static void main(String args[]) { int i,j,s; s=0; for(i=1;i<=3;i++) for(j=0;j<=i-1;j++) s=s+1; System.out.println(s); } }A.6B.5C.4D.3

考题 以下程序的运行结果为:public class test {public static void main(String args[]) {int i=0, j=2;do {i=++i;j--;} while(j>0);System.out.println(i);}} A. 0B. 1C. 2D.3

考题 以下程序的输出结果为:public class example {public static void main(String args[]) {int s=0;for (int i=0;i3*i;j--)s += i*j;}System.out.println(s);}} A. 127B.136C. 147D.153

考题 public class test3  {  public static void main(String args[])  {           for(int i = 0; i  3; i++)  {  for(int j = 3; j = 0; j--)  {                if(i == j)                    continue;       System.out.println("i="+ i + " j="+j);       }    }       }  }  上面的Java代码编译运行后,下列选项中,()会出现在输出结果中。 A、i=0 j=3B、i=0 j=0C、i=2 j=2D、i=0 j=2E、i=1 j=2

考题 public class Foo {   public static void main (String args) {   int i = 1;   int j = i++;   if ((i++j)  (i++ ==j)) {   i +=j;   }   }   }   What is the final value of i?()  A、 1B、 2C、 3D、 4E、 5