System.out.println ( a[6] ); } }
ÕýÈ·µÄÓï¾äÊÇ A.Êä³öÊÇnull. B.Êä³öÊÇ0. C.±àÒëʱ³ö´í. D.ÔËÐÐʱ³ö´í. ´ð£ºB
16. ±í´ïʽÖÐÉùÃ÷Ò»¸öº¬ÓÐ10¸öString¶ÔÏóµÄÊý×éÊÇ£¨µÚËÄÕ£© A. String str[ ]; B. String str[10]; C. char str[ ]; D. char str[ ][ ]; ´ð°¸ B
17. ÏÂÃæÓï¾äÕýÈ·µØÉùÃ÷Ò»¸öÕûÐͶþάÊý×éµÄÊÇ £¨µÚËÄÕ£© A. int a[][] = new int[][]; B. int a[10][10] = new int[][]; C. int a[][] = new int[10][10]; D. int [][]a = new int[10][10]; E. int []a[] = new int[10][10]; ´ð°¸CDE
18. ÉèÊý×éArrayÓÉÒÔÏÂÓï¾ä¶¨Ò壨µÚËÄÕ£© int Array=new int[10];
ÔòÊý×éµÄµÚÒ»¸öÔªËØµÄÕýÈ·ÒýÓ÷½·¨Îª A.Array[1] B. Array[0] C. Array[] D. Array ´ð°¸ B
19. ÒÑÖª£ºint[]a=new int[100];ÔÚÏÂÁиø³öµÄÊý×éÔªËØÖУ¬²»ºÏ·¨µÄÊÇ£¨µÚËÄÕ£© A. a[0]
B. a[1] C. a[99] D. a[100] ´ð°¸ D
20. ÉèÓÐÊý×鶨Ò壺int a[ ]={11,22,33,44,55,66,77,88,99};,ÔòÖ´ÐÐÏÂÃæÓï¾äºóÊä³ö½á¹ûΪ
for(int i=0;i if(a[i]%3==0) System.out.println(a[i]); £¨µÚËÄÕ£© A. 33 B. 66 C. 99 D. 44 ´ð°¸ABC 21. »ñÈ¡Êý×étempµÄ³¤¶È·½·¨ÓÐ £¨µÚËÄÕ£© A. temp.ArraySize; B. temp.ArraySize(); C. temp.length; D. temp.length(); ´ð°¸ C 22. ±í´ïʽ2+2+¡±bb¡±+2µÄÖµÊÇ£¨µÚÎåÕ£© A. ¡°22bb2¡± B. ¡°4bb2¡± C. ¡°22bb¡± D. ¡°bb2¡± ´ð°¸B 23. ÏÂÃæ³ÌÐò¶ÎÖе¼Ö´íÎóµÄÓУ¨µÚÎåÕ£© A. String s=¡±Gone with the wind¡±; String t=¡±good¡±; String k=s+t; B. String s=¡±Gone with the wind¡±; String t; t=s[3]+¡±one¡±; C. String s=¡± Gone with the wind¡±; String standard=s.toUpperCase(); D. String s=¡±home directory¡±; String t=s+¡±directory¡±; ´ð°¸B 24. ¸ø³öÏÂÃæµÄ³ÌÐò£º£¨µÚÎåÕ£© public class ex40(){ public static void main(String[ ] args){ StringBuffer a=new StringBuffer(¡°A¡±); StringBuffer b=new StringBuffer(¡°B¡±); method(a,b); System.out.println(a+¡±,¡±+b); } Static void method(StringBuffer x, StringBuffer y){ x.append(y); y=x; } } ÕýÈ·µÄÊä³ö½á¹ûÊÇ A.A,B B. A,A C.B,B D.AB,B ´ð°¸ D 25. ÏÂÃæÓï¾äÄܹ»ÕýÈ·µØÉú³É5¸ö¿Õ×Ö·û´®µÄÓУ¨µÚÎåÕ£© A. String a[]=new String[5]; for(int i=0;i<5;a[++]=\ B. String a[]={\ C. String a[5]; D. String[5]a; E. String []a=new String[5]; for( int i=0;i<5;a[i++]=null); ´ð°¸AB 26. ÒÑÖªÈç϶¨Ò壺String s = \£¨µÚÎåÕ£© ÏÂÃæ±í´ïʽºÏ·¨µÄÊÇ A. s += \B. char c = s[1]; C. int len = s.length; D. String t = s.toLowerCase(); ´ð: AD 27. ÒÑÖªÈçϵÄÃüÁîÖ´ÐÐ java MyJava a b c £¨µÚÎåÕ£© ÏÂÁÐÓï¾äÕýÈ·µÄÊÇ A. args[0] = \B. args[0] = \C. args[0] = \D. args[1]= 'b' ´ð£ºC D 28. ÏÂÁдúÂëÖУ¬·µ»ØfalseµÄÑ¡ÏîÓУ¨µÚÎåÕ£© String s= \String t = \ char c£Û£Ý = {¡äh¡ä,¡äe¡ä,¡äl¡ä,¡äl¡ä,¡äo¡ä} ; A. s.equals(t); B. t.equals(c); C. s==t; D. t==c; ´ð°¸ BCD 29. ˳ÐòÖ´ÐÐÏÂÁгÌÐòÓï¾äºó£¬ÔòbµÄÖµÊÇ£¨µÚÎåÕ£© String a=\ String b=a.substring£¨0,2£©; A. Hello B. hello C. Hel D. He ´ð°¸ D 30. String s=¡±Example String¡±; ÏÂÃæÕýÈ·µÄÊÇ£¨µÚÎåÕ£© A. s>>>=3; B. int i=s.length(); C. s[3]=¡±x¡±; D. String short_s=s.trim(); E. String t=¡±root¡±+s; ´ð°¸ BDE 31. ÏÂÁгÌÐò¶Î¿ÉÄܵ¼Ö´íÎóµÄÓУ¨µÚÎåÕ£© A. String s=¡±hello¡±; String t=¡±good¡±; String k=s+t; B. String s=¡±Hello¡±; String t; t=s[3]+¡±one¡±; C. String s=¡±hello¡±; String standard=s.toUpperCase(); D. String s=¡±hello¡±; String t; String t=s+¡±good¡±; ´ð°¸ D 32. ×Ö·û´®·ÖÁ½´óÀ࣬һÀàÊÇ×Ö·û´®³£Á¿£»ÁíÒ»ÀàÊÇ×Ö·û´®±äÁ¿£¬·Ö±ðÊÇ£¨µÚÎåÕ£© A. String StringBuffer B. String String C. StringBuffer StringBuffer D. String StringTokenizer ´ð°¸ A 33. StringBuffer() ¹¹Ôì·½·¨£¬Îª×Ö·û´®·ÖÅä¶àÉÙ¸ö×Ö·ûµÄ»º´æ£¬ËüÊÇĬÈϵĹ¹Ôì·½·¨£¨µÚÎåÕ£© A. 9 B. 12 C. 16 D. 20 ´ð°¸ C 34. Ö´ÐÐÏÂÁдúÂëºóString[] s=new String[10];½áÂÛÕýÈ·µÄÊÇ £¨µÚÎåÕ£© A. s[10] Ϊ \B. s[9] Ϊ null; C. s[0] Ϊ䶨Òå D. s.length Ϊ10 ´ð°¸ BD 35. ¹ØÓÚÒÔϳÌÐò¶Î£¬ÕýÈ·µÄ˵·¨ÊÇ £¨µÚÎåÕ£© 1. String s1=\2. String s2=new String(s1); 3. if(s1.equals(s2)) 4. System.out.println(\5. if(s1= =s2) 6. System.out.println(\A. ÐÐ4ÓëÐÐ6¶¼½«Ö´ÐÐ B.ÐÐ4Ö´ÐУ¬ÐÐ6²»Ö´ÐÐ C. ÐÐ6Ö´ÐУ¬ÐÐ4²»Ö´ÐÐ D.ÐÐ4¡¢ÐÐ6¶¼²»Ö´ÐÐ