下列选项______不是PilterInputStream的子类。
A:BufferedInputStream B:CheckedInputStream C:PushbacklnloutStream D:FilelnputStream
实现下列______接口可以对TextField对象的事件进行监听和处理。
A:ActionListener B:WindowListener C:MouseMotionListener D:FocusListener
在Java开发工具JDK的目录结构中,包含JDK的一些可执行文件的目录是______。
A:bin B:docs C:lib D:demo
下列程序的运行结果是______。
class A implements Runnable
int a;
iht i = 2;
A(int x)
a = x;
public void run( )
while(i > 0)
System.out.println("线程" + a);
i--;
public class Testl3
public static void main(String[] args)
Thread a1 = new Thread(new A(1));
Thread a2 = new Thread(new A(2));
a1.start( );
a2.start( );
A:线程1
线程1
线程2
线程2 B:线程1
线程2 C:线程1
线程2
线程1
线程2 D:线程1
线程1
线程1
线程1
下列程序的运行结果是______。
Class C14 implements Runnable
private int i;
public C14(int n)
this.i = n;
public void run)
try
Thread.currentThread( ).sleep(i);
catch(InterruptedException ie)
System.err.println(ie.tString( ));
System. out.println("线程" + Thread.currentThread( ) .getName
+ "睡眠了" + i + "毫秒结束");
public class Testl4
public static void main(String[] args)
Thread t = new Thread(new C14(300), "t");
t.start( );
A:线程t睡眠了300毫秒结束 B:线程Thread-0睡眠了300毫秒结束 C:线程t睡眠了i毫秒结束 D:线程Thread-0睡眠了i毫秒结束
下面程序执行后,baz的值应是______。
public class Test9
public static void main(String[] args)
int index = 1;
int fox[] = new int [3];
iht bar = fox [index];
int baz = bar + index;
System.out.println(baz);
B:1 C:2 D:编译错误
下面程序执行后,输出的值应是______。
public classs Test10
public static void main(String[] args)
float a=5, b=4, c=3;
if ( --a==b )
c=--a/c;
System.out.println(c);
A:1.33 B:1.0 C:0.0 D:1.67
如果一个Java Applet源程序文件中只定义了一个类,该类的类名为My Applet,则存储该源程序文件的文件名应为 【1】 。
MyApplet.java
创建一个名为MyPackage的包的语句是 【2】 。
package MyPackage;
表达式42<<4的值为 【3】 。