全部知识点

第5621题

在一个线程中调用下列方法,不会改变该线程运行状态的是( )。

第5622题

在关闭浏览器时调用,能够彻底终止Applet并释放该Applet所有资源的方法是( )。

第5623题

了将HelloApplet(主类名为HelloApplet.class)嵌入在greeting.html文件中,应该在下列greeting.html文件的横线处填入的代码是( )。

<HTML>
<HEAD>
<TITLE>Greetings</TITLE>
</HEAD>
<BODY>
<APPLET ______>
</APPLET>
</BODY>
</HTML>
第5624题

下列变量名的定义中,符合Java命名约定的是( )。

第5625题

自定义异常类的父类可以是( )。

第5626题

阅读下列程序片段:

public void test(){
    try{
        sayHello();
        System.out.println("hello");
    }catch(ArrayIndexOutOfBoundsException e){
        System.out.println("ArrayIndexOutOfBoundsException");
    }catch(Exception e){
        System.out.println("Exception");
    }finally{
        System.out.println("finally");
    }
}

如果sayHello()方法正常运行,则test()方法的运行结果将是( )。

第5627题

为使Java程序独立于平台,Java虚拟机把字节码和各个操作系统及硬件( )。

第5628题

Java中的基本数据类型int在不同的操作系统平台的字长是( )。

第5629题

String、StringBuffer都是( )类,都不能被继承。

第5630题

下列程序的功能是统计字符串中“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 individual value"
                +"through an integer index. For example,if a is an array"
                +"of inegers,then a[i] is the ith integer in the array.";
        int arrayCount=0;
        int index=-1;
        String arrayStr="array";
        index=text.indexOf(arrayCount);
        while(index ______ 0)
        {
            ++arrayCount;
            index+=arrayStr.length();
            index=text.indexOf(arrayStr,index);
        }
        System.out.println("the text contains"+arrayCount+"arrays");
    }
}
第5631题

构造方法名必须与( )相同,它没有返回值,用户不能直接调用它,只能通过new调用。

第5632题

在多线程并发程序设计中,能够给对象X加锁的语句是( )。

第5633题

Java中类ObjectOutputStream支持对象的写操作,这是一种字节流,它的直接父类是( )。

第5634题

在下列程序的空白处,应填入的正确选项是( )。

import java.io.*;
public class ObjectStreamTest{
    public static void main(String[] args)throws IOException{
        ObjectOutputStream oos=new ObjectOutputStream(new FileOutputStream("serial.bin"));
        java.util.Date d=new java.util.Date();
        oos.______;
        ObjectInputStream ois=new ObjectInputStream(new FileOutputStream("serial.bin"));
        try{
            java.util.Date restoredDate=(java.util.Date)ois.readObject();
            System.out.println("read object back from serial.bin file:"+restoredDate);
        }catch(ClassNotFoundException cnfe){
            System.out.println("class not found");
        }
    }
}
第5635题

Class类的对象由( )自动生成,隐藏在.class文件中,它在运行时为用户提供信息。

第5636题

在Java中,实现用户界面功能的包是( )。

第5637题

“++”运算符的操作数个数是( )。

第5638题

在switch(expression)语句中,expression的数据类型不能是( )。

第5639题

下列叙述中,错误的是( )。

第5640题

已知:int a[]=new int[100];在下列给出的数组元素中,非法的是( )。