单选题
下列程序的功能是统计字符串中"array"的个数,在程序的空白处应填入的正确选项是:
下列程序的功能是统计字符串中"array"的个数,在程序的空白处应填入的正确选项是:
public class FindKeyWords{
public static void main(sring[] args){
String 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;
String arrarStr ="array";
index = text.indexof(arrayStr);
while(index ______ 0) {
++arrayCount;
index += arrayStr.length();
index = text.indexof(arrayStr,index);
}
System.out.println
("the text contains" + arrayCount + "arrays");
}
}
A
<
B
=
C
<=
D
>=
答案解析
正确答案:D
题目纠错
相关题目
单选题
一般情况下,校园网属于( )。
单选题
Word页面设置对话框中不能设置( )。
单选题
要在Web浏览器中查看某一公司的主页,必须知道( )。
单选题
在Excel中要删除某个工作表,在用鼠标右键单击该工作表标签后,在弹出快捷菜单中选择( )。
单选题
要浏览网页,必须知道该网页的( )。
单选题
在Word中选择某一段文字后,把鼠标指针置于选中文本的任一位置,按鼠标左键拖到另一位置上放开鼠标。那么,该用户刚才的操作是( )。
单选题
在Word中选择了文本后,按Del键将选择的文本( )
单选题
信息高速公路计划使计算机应用进入了( )的新的发展阶段。
单选题
信息处理进入了计算机世界,实质上是进入了( )的世界。
单选题
想访问最近曾经访问过的网页用浏览器中哪个按钮( )。
