[单选题]

阅读下面程序 public class ForLoopStatement { public static void main(String[] args) { int i,j; for(i=1;i<5;i++){ //i循环 for(j=1;j<=i;j++)System.out.print(i+"*"+j+"="+i*j+" "); //j循环 System.out.println(); } } } 程序完成后,i循环和J循环执行的次数分别是

A.4,10

B. 8,9

C.9,8

D.10,10

参考答案与解析:

相关试题

请阅读下面程序public class ForLoopStatement {pu

[单选题]请阅读下面程序 public class ForLoopStatement { public static void main(string []args){ int i,j; for (i=1; i<5; i++) { //i循环 for (j=1;j<=i;j++) //j循环 System.out.print(i+"×"+j+"="+i*j+" "); System.out.println(); } } } 程序完成后,i循环和j循环执行的次数分别是A.4,10B.8,9C.9

  • 查看答案
  • 请阅读下面程序public class ForLoopStatement {pu

    [单选题]请阅读下面程序 public class ForLoopStatement { public static void main(string []args){ int i,j; for (i=1; i<5; i++) { //i循环 for (j=1;j<=i;j++) //j循环 System.out.print(i+"×"+j+"="+i*j+" "); System.out.println(); } } } 程序完成后,i循环和j循环执行的次数分别是A.4,10B.8,9C.9

  • 查看答案
  • ( 24 )请阅读下面程序public class ThreadTest {pu

    [单选题]( 24 )请阅读下面程序public class ThreadTest {public static void main ( String args[ ]){Thread t1 = new Thread ( new Hello ()):Thread t2 = new Thread ( new Hello ()):t l .start ():t2.start ();}}class Hello implements Runnable {int i ;public void run (){while

  • 查看答案
  • ( 28 )请阅读下面程序public class ThreadTest {pu

    [单选题]( 28 )请阅读下面程序public class ThreadTest {public static void main ( String args[ ]) throws Exception {int i=0;H.ello t = new Hello ();___________;whlle ( true ){System.out.println ( "Good Morning"+i++ ) ;if ( i=2 && t.isAlive ()){System.out.println (

  • 查看答案
  • 阅读下面程序public class VariableUse { public

    [单选题]阅读下面程序 public class VariableUse { public static void main(String[] arqs) { int a; if(a==8) { int b=9; System.out.println("a="+a); System.out.println("b="+b); } System.out.println("a="+a); System.out.println("b="+b): } } 该程序在编译时的结果是A.变量a未赋值B.第

  • 查看答案
  • 阅读下面程序:public class ThreadTest { public

    [单选题]阅读下面程序: public class ThreadTest { public static void main(String args[]) throws Exception { int i=0; Hello t=new Hello(); ______; While(true) } System.out.println("Good Morning"+i++); if(i==2&&t.isAlive()) { System.out.println("Main waitin

  • 查看答案
  • 阅读下面程序public class Increment { public st

    [单选题]阅读下面程序 public class Increment { public static void main( String args[] ){ int c; c=5; System.out.println(C) ; System.out.println(c++); System.out.println(C) ; } }A.5 6 6B.5 5 6C.6 7 7D.6 6 6

  • 查看答案
  • 阅读下面程序public class Increment {public sta

    [单选题]阅读下面程序 public class Increment { public static void main( String args[] ){ int c; c=5; System.out.println( c ); System.out.println( c++ ); System.out.println( c ); } )程序运行结果是( )。A.5 6 6B.5 5 6C.6 7 7D.6 6 6

  • 查看答案
  • 阅读下面程序 public class ConcatTest{public st

    [单选题]阅读下面程序 public class ConcatTest{ public static void main(String[] args) { String strl = "abc"; String str2 = "ABC"; String str3 = str1.concat(str2); System.out.println(str3); } } 程序的运行结果是:A.abeB.ABCC.abcABCD.ABCabc

  • 查看答案
  • 阅读下面程序public class Increment { public st

    [单选题]阅读下面程序 public class Increment { public static void main( String args[] ){ int c; c=5; System.out.println(C) ; System.out.println(c++); System.out.println(C) ; } }A.5 6 6B.5 5 6C.6 7 7D.6 6 6

  • 查看答案
  • 阅读下面程序public class ForLoopStatement { pu