当前分类: Java认证考试
问题:程序员想要创建一个名为MyThread的类以便在main方法中用Thread实例化。对于下面三行: MyThread必须继承Thread。 MyThread必须实现Thread。 MyThread必须覆盖public void run()。 有几行是正确的?() A、 0B、 1C、 2D、 3...
查看答案
问题:Assume the custom tag my:errorProne always throws a java.lang.RuntimeException with the message "Filenot found." An error page has been configured for this JSP page. Which option prevents the exceptionthrown by my:errorProne from invoking the error page m...
问题:什么是常量?什么是变量?字符变量与字符串常量有何不同?...
问题:类可以同时使用final和abstract进行修饰...
问题:Which two are characteristics of the Transfer Object design pattern?()A、It reduces network traffic by collapsing multiple remote requests into one.B、It increases the complexity of the remote interface by removing coarse-grained methods.C、It increases the ...
问题:现有: class Output&ens...
问题:下载并安装JDK软件包,并尝试查看其中的JDK文档。...
问题:You want subclasses in any package to have access to members of a superclass. Which is the mostrestrictive access modifier that will accomplish this objective?() A、 PublicB、 PrivateC、 ProtectedD、 TransientE、 No access modifier is qualified...
问题:数组的长度可以通过以下哪个属性或方法得到?() A、sizeB、lengthC、getSize()D、getLength()...
问题:Java可以设置程序的界面外观,即可以让程序在不同操作系统下按照...
问题:Which of the following statements are legal?() A、 long l = 4990;B、 int i = 4L;C、 float f = 1.1;D、 double d = 34.4;E、 double t = 0.9F;...
问题:在java中,下列标识符不合法的有()。...
问题:针对Set s接口,下列哪项是正确的?() A、 s.add(2)B、 s.add(new Integer(2))C、 s.add(“2”)D、 s.add(new java.util.Date())...
问题:现有:t是一个合法的Thread对象的引用,并且t的合法run()方法如下: public void run() { System.out.print ("go"); } 及: t.start(); t.start(); t.run(); 哪一个是结果?() A、go goB、go go goC、go之后跟着一个异常D、go go之后跟着一个异常...
问题:结构型模式中最体现扩展性的模式是()。...
问题:以下关于Java文件名的叙述,正确的有?()A、Java源文件的扩展名应为.javaB、Java源文件的文件名应与文件中的类名一致C、Java字节码文件的扩展名应为.javaD、一个Java源文件中只能包含一个Java类...
问题:Assuming that the serializeBanana() and the deserializeBanana() methods will correctly use Java serialization and given: import java.io.*; class Food implemertts Serializable {int good = 3;} class Fruit externds Food {int juice = 5;} public class Bana...
问题:Given that a static method doIt() in a class Work represents work to be done, what block of code will succeed in starting a new thread that will do the work? CODE BLOCK a: Runnable r = new Runnable() { public void run() { Work.doIt(); } }; T...
问题:输入流与输出流各有什么方法?...
问题:Which method must be used to encode a URL passed as an argument to HttpServletResponse.sendRedirect when using URL rewriting for session tracking?()A、 ServletResponse.encodeURLB、 HttpServletResponse.encodeURLC、 ServletResponse.encodeRedirectURLD、 HttpSer...