Java软件开发练习题
C)Exception
Finally
D)Hello
Finally
16、为使Java程序独立于平台,Java虚拟机把字节码与各个操作系统及硬件
A)分开
B)结合
C)联系
D)融合
17、Java中的基本数据类型int在不同的操作系统平台的字长是
A)不同的
B)32位
C)64位
D)16位
18、String、StingBuffer都是______类,都不能被继承。
A)static
B)abstract
C)final
D)private
19、下列程序的功能是统计字符串中“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(arrayStr);
While(index 0) {