word¸ñʽ
A. СÓÚ 0 B. СÓÚ 4 C. 4 ºÍ9Ö®¼ä D. ´óÓÚ9 E. ÎÞÈκοÉÄÜ 10£©ÓÐÈçÏ´úÂë¶Î£º switch ( x ){
case 1:System.out.println(\ case 2:
case 3:System.out.println(\ default:System.out.println(\}
±äÁ¿xµÄȡֵÏÂÁÐÄÄЩÇéÐÎʱ£¬ÄÜʹ³ÌÐòÊä³ö\¡£ A. 1 B. 2 C. 3 D. default 11£©ÒÔϳÌÐòµÄÊä³ö½á¹ûΪ public class test {
public static void main(String agrs[]) { char c1=¡¯B¡¯,c2=¡¯C¡¯; if (c1+1 A. B B. b C. C D. c 12) ¼ÙÉèaÊÇintÀàÐͱäÁ¿£¬²¢³õʼ»¯Îª1£¬ÔòÏÂÁÐÄĸöΪºÏ·¨µÄÌõ¼þÓï¾ä£¿ A. if (a) { } B. if (a<<3) { } C. if (a=2) { } D. if (true) { } ËÄ¡¢Ñ»·³ÌÐòÉè¼Æ 1£©Ö´ÐÐÒÔϳÌÐòºó£¬Êä³ö½á¹ûΪ public class ex2{ public static void main(String args[]) { int f=1; int k; for (k=2;k<5;k++) f*=k;; System.out.println(k); .. .. word¸ñʽ } } A. 0 B. 1 C. 5 D. 4 E. 24 2£© ÉèÓÐÈçÏÂÀà class Loop{ public static void main(String[] agrs) { int x=0;int y=0; outer: for(x=0;x<100;x++){ middle: for(y=0;y<100;y++){ System.out.println(\ if(y==10){ << ÔÚ<< 3£©ÒÔÏ´úÂëµÄÔËÐнá¹ûΪ£º public class Calc { public static void main (String args []) { int total = 0; for (int i = 0, j = 10; total > 30; ++i, --j) { System.out.println(\ total += (i + j); } System.out.println(\ } } A. ²úÉúÔËÐдíÎó .. .. word¸ñʽ B. ²úÉú±àÒë´íÎó C. Êä³ö \D. ²úÉúÈçÏÂÊä³ö: i = 0 : j = 10 i = 1 : j = 9 i = 2 : j = 8 Total 30 4£©ÒÔϳÌÐòµÄÔËÐнá¹ûΪ: 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. 0 B. 1 C. 2 £Ä.3 5£©ÒÔϳÌÐòµÄÔËÐнá¹ûΪ£¿ class xyz { public static void main(String args[]) { int i,j,k; for (i = 0; i < 3; i++) { for(j=1; j < 4; j++) { for(k=2; k<5; k++) { if((i == j) && (j==k)) System.out.println(i); } } } } } A. 0 B. 1 C. 2 D. 3 E. 4 6£© ÒÔϳÌÐòµÄÔËÐнá¹ûΪ£¿ .. .. word¸ñʽ class test { public static void main(String args[]) { int i,j=0; for(i=10;i<0;i--) { j++; } switch(j) { case (0) : j=j+1; case (1) : j=j+2; break; case (2) : j=j+3; break; case (10) : j=j+10; break; default : break; } System.out.println(j); } } A. 0 B. 1 C. 2 D. 3 E. 10 7£© ¹Û²ìÒÔϳÌÐò¶Î: int i=1,j=10; do{ if(i++>--j) continue; } while(i<5); Ö´ÐÐÍêºó£¬i¡¢jµÄÖµ·Ö±ðΪ£º A£® i=6 j=5 B£® i=5 j=5 C£® i=6 j=4 D£® i=5 j=6 8£©ÒÔϳÌÐòµÄÊä³ö½á¹ûΪ: public class example { public static void main(String args[]) { int s=0; for (int i=0;i<5;i++) { for (int j=10;j>3*i;j--) s += i*j; } System.out.println(s); } } A. 127 B.136 C. 147 D.153 .. ..