全部知识点

第5701题

阅读下列代码:

abstract class Person
{
    public Person(String n){
        name = n;
    }
    public ______ String getDescription();
    public String getName(){
        return name;
    }
    private String name;
}

在下划线处应填入的修饰符是( )。

第5702题

阅读下列代码:

public class Jixiangwu{
    public static void main(String[] args){
        String[] stars = {"贝贝","晶晶","欢欢","迎迎","妮妮"};
        System.out.println("你抽取的奥运吉祥物是 + ""
            + stars[(int)(stars.______ * Math.random())] + ""+ "!");
    }
}

为保证程序能正确执行,程序中下划线处应填写的是( )。

第5703题

下列方法中可用于定义线程体的是( )。

第5704题

下列方法中与Applet显示无关的是( )。

第5705题

下列语句中错误的是( )。

第5706题

下列可用作switch(expression)语句参数的是( )。

第5707题

当浏览器重新返回到包含Applet的页面时调用的方法是( )。

第5708题

阅读下列代码:

public class Test{
    public static void main(String args[]){
        System.out.println((2<0)? 10:8);
    }
}

其运行结果是( )。

第5709题

阅读下列代码:

public class Arrays{
    public static void main(String[] args){
        int[] a = new int[5];
        for(int i=0;i<a.length;i++){
            a[i] = 10 + i;
        }
        for(int i=0;i<a.length;i++){
            System.out.println(a[i]);
        }
        String[] s = {"Frank","Bob","Jim"};
        for(int i=0;i<s.length;i++){
            System.out.println(s[i]);
        }
        s[2] = "Mike";
        System.out.println(s[2]);
    }
}

代码运行结果正确的是( )。

第5710题

下列方法中能够用来实现线程之间通信的是( )。

第5711题

下列关于线程的说法中,正确的是( )。

第5712题

下列概念中不包括任何实现,与存储空间没有任何关系的是( )。

第5713题

阅读下列一个支持多线程并发操作的堆栈类代码段:

public class MyStack{
    private int idx = 0;
    private int[] data = new int[8];
    public ______ void push(int i){
        data[idx] = i;
        idx ++;
    }
}

在下划线处应填入的是( )。

第5714题

阅读下列代码:

public class Test implements Runnable{
    public void run(Thread t){
        System.out.println("Running");
    }
    public static void main(String[] args){
        Thread t = new Thread(new Test());
        t.start();
    }
}

代码运行结果是( )。

第5715题

 阅读下列代码:

public class s {
    String s = "One World One Dream";
    public static void main(String args[]){
        System.out.println(s);
    }
}

其运行结果是( )。

第5716题

下列关于线程调度的叙述中,错误的是( )。

第5717题

 调用线程的下列方法,不会改变该线程在生命周期中状态的方法是( )。

第5718题

在下面附属类方法中的下划线处应填入的正确参数是( )。

public void writeData(______)throws IOException
{
    GregorianCalendar calendar = new GregorianCalendar();
    calendar.setTime(hireDay);
    out.println( name + "|"
        + salary + "|"
        + calendar.get(Calendar.YEAR) + "|"
        + (calendar.get(Calendar.MONTH) + 1) + "|"
        + calendar.get(Calendar.DAY_OF_MONTH));
}
第5719题

 下面程序段:

boolean a = false;
boolean b = true;
boolean c = (a&&b)&&(! b);
boolean result = (a&b)&(! b);

执行完后,正确的结果是( )。

第5720题

 在匹配器(Matcher)类中,用于输入字符串与模式串比较的方法是( )。