[单选题]

下列程序的功能是统计字符串中“array”的个数,在程序的空白处应填入的正确选项是(  )。
publicclassFindKeyWords
publicstaticvoidmain(Sting[]args)
Stingtext=
"Anarrayisadatastructurthatstoresacollectionof"
+"valuesofthesametype.Youaccesseachindividualvalue"
+"throughanintegerindex.Forexample,ifaisanarray"
+"ofinergers,thena[i]istheithintegerinthearray.";
intarrayCount=0;
intindex=-1:
StingarrarStr="array":
index=text.indexof(arrayStr):
While(index ??______??0)
++arrayCount;
index+=arrayStr.length();
index=text.indexof(arrayStr,index);
System.out.println

"thetextcontains"+arrayCount+"arrays");

A.<

B.=

C.<=

D.>=

参考答案与解析:

相关试题

下列程序的功能是统计字符串中“array”的个数,在程序的空白处应填入的正确选项

[单选题]下列程序的功能是统计字符串中“array”的个数,在程序的空白处应填入的正确选项是( )。 publicclassFindKeyWords{ publicstaticvoidmain(sring[]args){ stingtext= “Anarrayisadatastructurthatstoresacollectionof” +“valuesofthesametype.YOUaccesseachindividualvalue'’ +“throughanintegerindex.Forexam

  • 查看答案
  • 下面程序的功能是统计字符串中“array”的个数,在程序的空白处应填入的正确选项

    [单选题]下面程序的功能是统计字符串中“array”的个数,在程序的空白处应填入的正确选项是 public class FindKeyWords{ public static void main(String[]args) { String text="An array is a data structur that stores a collection of" +"values of the same type. You access each indMdual value" +"throu

  • 查看答案
  • 下列程序的功能是统计字符串中“array”的个数,在程序的空白处应填入的正确选项是(  )。<br />图片第二行有误,应为: publicstaticvoidmain(String[]a

    [单选题]下列程序的功能是统计字符串中“array”的个数,在程序的空白处应填入的正确选项是(  )。图片第二行有误,应为: publicstaticvoidm

  • 查看答案
  • ( 30 )下列程序的功能是统计字符串中 “ array ” 的个数,在程序的空

    [单选题]( 30 )下列程序的功能是统计字符串中 “ array ” 的个数,在程序的空白处应填入的正确选项是public class FindKey Word s{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

  • 查看答案
  • 在下列程序的空白处,应填入的正确选项是(  )。<br />importjava.io.*;<br />publicclasswriteInt<img border=&q

    [单选题]在下列程序的空白处,应填入的正确选项是(  )。importjava.io.*;publicclasswriteInt。publicstaticvoi

  • 查看答案
  • 在下列程序的空白处,应填入的正确选项是(  )。<br />importjava.io.*;<br />publicclassObjectStreamTest<img b

    [单选题]在下列程序的空白处,应填入的正确选项是(  )。importjava.io.*;publicclassObjectStreamTestpublicst

  • 查看答案
  • 在下列程序的空白处,应填入的正确选项是(  )。<br />图片有误,所有的oos、public、java、catch首字母应该小写。<br /><img border=

    [单选题]在下列程序的空白处,应填入的正确选项是(  )。图片有误,所有的oos、public、java、catch首字母应该小写。A.WriterObject

  • 查看答案
  • (8)下列这个Sub过程的功能是统计字符串中“a”的个数,请在空白处填上合适的代

    [主观题](8)下列这个Sub过程的功能是统计字符串中“a”的个数,请在空白处填上合适的代码,将程序补充完整。Private Sub numCount() Dim num As Integer s$="software And hardware" Num=Len(s$) For i=1 unm b$=。 If b$="a"Then x=x+1 Next i Print"x=";xEnd Sub

  • 查看答案
  • 下列程序的功能是将字符串“abcde”逆序打印出来。请填写空白处以完善程序。 M

    [主观题]下列程序的功能是将字符串“abcde”逆序打印出来。请填写空白处以完善程序。 Munction rev(str1)As String B = Mid(,1,1) If B =""Then rev ="" Else rev = rev(Mid(str1,2))+b End If End Function Private Sub Form_Click() old ="abcde" Print rev(old) End Sub

  • 查看答案
  • 在下列程序的空白处,应填入的正确选项是()。importjava.io.*;Pu

    [单选题]在下列程序的空白处,应填入的正确选项是( )。 importjava.io.*; PublicclasswriteInt{ Publicstaticvoidmain(stringl)a){ Int[]myArray={10,20,30,40}; try{ DataOutputSystemdos=newDataOutputSystem (newFileOu中utSystem(“ints.dat”)); for (int i=0;I<MYARRAY.LENGTH:I++) dos.writeInt(

  • 查看答案