相关题目
Java中类ObjectOutputStream支持对象的写操作,这是一种字节流,它的直接父类是:
在多线程并发程序设计中,能够给对象x加锁的语句是:
构造方法名必须与______相同,它没有返回值,用户不能直接调用它,只能通过new调用。
下列程序的功能是统计字符串中"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");
}
}
String、StingBuffer都是______类,都不能被继承。
Java中的基本数据类型int在不同的操作系统平台的字长是:
为使Java程序独立于平台,Java虚拟机把字节码与各个操作系统及硬件:
阅读下列程序片段
public void test(){
try{
sayHello();
system.out.println("Hello");
} catch (ArrayIndexOutOfBoundException e) {
System.out.println("ArrayIndexOutOfBoundException");
}catch(Exception e){
System.out.println("Exception");
}finally {
System.out.println("Finally");
}
}
如果sayHello( )方法正常运行,则test( )方法的运行结果将是:
自定义异常类的父类可以是:
下列变量名的定义中,符合Java命名约定的是:
