对于下列程序,哪个叙述是正确的?()
A. JVM认为这个应用程序共有两个线程。
B. JVM认为这个应用程序只有一个主线程。
C. JVM认为这个应用程序只有一个thread线程。
D. thread的优先级是10级。public class
E. { public static void main(String args[]) { Target target =new Target(); Thread thread =new Thread(target); thread.start(); }}class Target implements Runnable{ public void run(){ System.out.println("ok"); }}
为了向文件hello.txt尾加数据,下列哪个是正确创建指向hello.txt的流?( )
A. try { OutputStream out = new FileOutputStream ("hello.txt"); } catch(IOException e){}
B. try { OutputStream out = new FileOutputStream ("hello.txt",true); } catch(IOException e){}
C. try { OutputStream out = new FileOutputStream ("hello.txt",false); } catch(IOException e){}
D. try { OutputStream out = new OutputStream ("hello.txt",true); }catch(IOException
E. {}
下面说法错误的是:( )
A. 单击JCheckBox (复选框)产生ItemEvent事件,并由ItemListener处理。
B. 处理JButton和JTextField事件监听器接口都可以是ActionListener。
C. 处理鼠标事件的事件监听器接口只有MouseListener。
D. 在JTextField和JPasswordField中输入数据后按Enter键会激发一个事件。
下面说法错误的是:( )
A. Java.net包中的URL类的实例,即对象封装着一个具体的资源
B. 一个URL对象通常只包含一部分的信息即协议。
C. URL类创建对象需要捕获MalformedURLException
D. URL是Uniform Resource Lactor的缩写。