下列程序的功能是统计字符串中“array”的个数,在程序的空白处应填入的正确选项是( )。
public class FindKeyWords
public static void main(sring[]args)
sting text=
"An array is a data structur that stores a collection of"
+"values of the same type. You access each individual value"
+"through an integer index. For example,if a is an array"
+"of inergers,then a[i]is the ith integer in the array.";
Int arrayCount=0;
Int idex=-1;
Sting arrarStr="array";
Index=text.indexof(arravStr);
While(index______0)
++arrayCount;
Index+=arrayStr.length( );
Index=text.indexof(arrayStr,index);
System.out.println
("the text contains"+arrayCount+"arrays");
题库:计算机等级考试
类型:最佳选择题
时间:2017-07-03 14:19:00
免费下载:《单项选择》Word试卷
下列程序的功能是统计字符串中“array”的个数,在程序的空白处应填入的正确选项是( )。
public class FindKeyWords
public static void main(sring[]args)
sting text=
"An array is a data structur that stores a collection of"
+"values of the same type. You access each individual value"
+"through an integer index. For example,if a is an array"
+"of inergers,then a[i]is the ith integer in the array.";
Int arrayCount=0;
Int idex=-1;
Sting arrarStr="array";
Index=text.indexof(arravStr);
While(index______0)
++arrayCount;
Index+=arrayStr.length( );
Index=text.indexof(arrayStr,index);
System.out.println
("the text contains"+arrayCount+"arrays");
A.<
B.=
C.<=
D.>=
本题关键词:应急处置程序,统计工作程序,空间序列,数字字符串,程序,处方销毁程序,当场处罚程序,建设项目程序,项目融资程序,项目建设程序;