单选题 下列程序的功能是统计字符串中"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、 >=
下载APP答题
由4l***kc提供 分享 举报 纠错

相关试题

单选题 下列不属于Swing的构件是:

A、JButton
B、JLabel
C、JFrame
D、JPane

单选题 AWT中用来表示颜色的类是:

A、Font
B、Color
C、Panel
D、Dialog

单选题 阅读下列程序 public class VariableUse{ public static void main (String[] args) { int a; if (a==8) { int b=9; System.out.println("a = "+a); System.out.println("b = "+b); } System.out.println("a = "+a); System.out.println("b = "+b); } } 该程序在编译时的结果是:

A、变量a未赋值
B、第二个System.out.println(“b = ”+b)语句中,变量b作用域有错
C、第二个System.out.println(“a = ”+a)语句中,变量a作用域有错
D、第一个System.out.println(“b = ”+b)语句中,变量b作用域有错

单选题 在方法内部使用,代表对当前对象自身引用的关键字是:

A、super
B、This
C、Super
D、this

单选题 Java虚拟机(JVM)运行Java代码时,不会进行的操作是:

A、加载代码
B、校验代码
C、编译代码
D、执行代码

单选题 对鼠标点击按钮操作进行事件处理的接口是:

A、MouseListener
B、WindowsListener
C、ActionListener
D、KeyListener

单选题 Java程序的并发机制是:

A、多线程
B、多接口
C、多平台
D、多态性

单选题 下列运算符中,优先级最高的是:

A、++
B、+
C、*
D、>