AI智能推荐题库-试题通 AI智能整理导入题库-试题通
×
首页 题库中心 2022信息技术知识竞赛 题目详情
CA08B85056E00001101A150F1A903560
2022信息技术知识竞赛
3,650
单选题

下列程序的功能是统计字符串中"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
题目纠错
2022信息技术知识竞赛

扫码进入小程序
随时随地练习

关闭登录弹窗
专为自学备考人员打造
勾选图标
自助导入本地题库
勾选图标
多种刷题考试模式
勾选图标
本地离线答题搜题
勾选图标
扫码考试方便快捷
勾选图标
海量试题每日更新
波浪装饰图
欢迎登录试题通
可以使用以下方式扫码登陆
APP图标
使用APP登录
微信图标
使用微信登录
试题通小程序二维码
联系电话:
400-660-3606
试题通企业微信二维码