当前分类: Java认证考试
问题:Which of the f...
查看答案
问题:现有: class Output&ens...
问题:void waitForSignal() { Object obj = new Object(); synchronized (Thread.currentThread()) { obj.wait(); obj.notify(); } } Which is true?() A、 This code may throw an InterruptedException.B、 This code may throw an IllegalStateException.C、 This code may...
问题:下载并安装JDK软件包,并尝试查看其中的JDK文档。...
问题: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...
问题:class Sock2 { String color; public boolean equals(Object o) { return color.equals(((Sock2)o).color); } } class TestSocks { public static void main(String [] args) { Sock2 s1 = new Sock2(); s1.color = "blue"; Sock2 s2 = new Sock2(); s2.colo...
问题:程序员想要创建一个名为MyThread的类以便在main方法中用Thread实例化。对于下面三行: MyThread必须继承Thread。 MyThread必须实现Thread。 MyThread必须覆盖public void run()。 有几行是正确的?() A、 0B、 1C、 2D、 3...
问题:public static Iterator reverse(List list) { Collections.reverse(list); return list.iterator(); } public static void main(String[] args) { List list = new ArrayList(); list.add(” 1”); list.add(”2”); list.add(”3”); for (Object obj: reverse(list)) Sy...
问题:在java中,引用对象变量和对象间有什么关系?()...
问题:输入流与输出流各有什么方法?...
问题: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...
问题: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;...
问题:public class Test&ens...
问题:Which security mechanism is employed only on the server-side to limit access to resources or components?()A、 authorizationB、 data integrityC、 confidentialityD、 authentication...
问题: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 ...
问题:java接口的方法修饰符可以为()。(忽略内部接口)...
问题:现有 public class Demo{ public static void main (String[] args){ List al=new ArrayList(); a1.add("l"); a1.add("2"); a1.add("2"); a1.add("3"); System.out.println (al); } } 上述程序执行后的输出是哪项?() A、 [1,2,3]B、 [1,2,3,3]C、...
问题:在子类中调用父类中被覆盖的方法时需要使用哪项关键字?()Q...
问题:现有: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之后跟着一个异常...
问题:数组的长度可以通过以下哪个属性或方法得到?() A、sizeB、lengthC、getSize()D、getLength()...