网友您好, 请在下方输入框内输入要搜索的题目:

题目内容 (请给出正确答案)

In a JSP-centric web application, you need to create a catalog browsing JSP page. The catalog is stored asa List object in the catalog attribute of the webapp’s ServletContext object.  Which scriptlet code snippetgives you access to the catalog object?()

  • A、<% List catalog = config.getAttribute("catalog"); %>
  • B、<% List catalog = context.getAttribute("catalog"); %>
  • C、<% List catalog = application.getAttribute("catalog"); %>
  • D、<% List catalog = servletContext.getAttribute("catalog"); %>

参考答案

更多 “ In a JSP-centric web application, you need to create a catalog browsing JSP page. The catalog is stored asa List object in the catalog attribute of the webapp’s ServletContext object.  Which scriptlet code snippetgives you access to the catalog object?()A、% List catalog = config.getAttribute("catalog"); %B、% List catalog = context.getAttribute("catalog"); %C、% List catalog = application.getAttribute("catalog"); %D、% List catalog = servletContext.getAttribute("catalog"); %” 相关考题
考题 public interface A {  String DEFAULT_GREETING = “Hello World”;  public void method1();  }  A programmer wants to create an interface called B that has A as its parent. Which interface declaration is correct?() A、 public interface B extends A {}B、 public interface B implements A {}C、 public interface B instanceOf A {}D、 public interface B inheritsFrom A {}

考题 移位和按位运算符有哪些作用?()A、 左移“〈〈”可将整数乘以2或者2的若干次方B、 按位与“”可设置二进制数的某些位为0C、 按位或“”可将两个二进制数相加D、 按位异或“^”可将二进制数的某些位或者所有位设为相反的值E、 无符号右移“”可将整数除以2或者2的若干次方

考题 定义有StringBuffer s1=new StringBuffer(10);s1.append(“1234”)则s1.length()和s1.capacity()分别是多少?A、4;10B、4;4C、10;10D、10;4

考题 Public class test (  Public static void stringReplace (String text)  (  Text = text.replace (‘j’ , ‘i’);  )  public static void bufferReplace (StringBuffer text)  (  text = text.append (“C”)  )   public static void main (String args[]}  (  String textString = new String (“java”); StringBuffer text BufferString = new StringBuffer (“java”);  stringReplace (textString);  bufferReplace (textBuffer);  System.out.printLn (textString + textBuffer);  ) )  What is the output?()

考题 Which two are true concerning the objects available to developers creating tag files?()A、The session object must be declared explicitly.B、The request and response objects are available implicitly.C、The output stream is available through the implicit outStream object.D、The servlet context is available through the implicit servletContext object.E、The JspContext for the tag file is available through the implicit jspContext object.

考题 某二叉树的先根遍历序列和后根遍历序列正好相反,则该二叉树具有的特征是()。A、高度等于其结点数B、任一结点无左孩子C、任一结点无右孩子D、空或只有一个结点

考题 1. import java.util.*;  2. public class TestSet {  3. enum Example { ONE, TWO, THREE }  4. public static void main(String[] args) {  5. Collection coll = new ArrayList();  6. coll.add(Example.THREE);  7. coll.add(Example.THREE);  8. coll.add(Example.THREE);  9. coll.add(Example.TWO);  10. coll.add(Example.TWO);  11. coll.add(Example.ONE);  12. Set set = new HashSet(coll);  13. }  14. }  Which statement is true about the set variable on line 12?() A、 The set variable contains all six elements from the coll collection, and the order is guaranteed to be preserved.B、 The set variable contains only three elements from the coll collection, and the order is guaranteed to be preserved.C、 The set variable contains all six elements from the coil collection, but the order is NOT guaranteed to be preserved.D、 The set variable contains only three elements from the coil collection, but the order is NOT guaranteed to be preserved.

考题 A developer is designing the presentation tier for a web application which requires a centralized requesthandling to complete common processing required by each request. Which design pattern provides asolution to this problem?()A、Remote ProxyB、Front ControllerC、Service ActivatorD、Intercepting FilterE、Business Delegate

考题 import java.io.*;  public class Forest implements Serializable {  private Tree tree = new Tree();  public static void main(String [] args) {  Forest f= new Forest();  try {  FileOutputStream fs = new FileOutputStream(”Forest.ser”);  ObjectOutputStream os = new ObjectOutputStream(fs);  os.writeObject(f); os.close();  } catch (Exception ex) { ex.printStackTrace(); }  }  }  class Tree { }  What is the result?() A、 Compilation fails.B、 An exception is thrown at runtime.C、 An instance of Forest is serialized.D、 A instance of Forest and an instance of Tree are both serialized.

考题 下面哪个方法声明要求子类必须提供实现()A、public doublem();B、static voidm(){}C、abstrac tdoublem();D、protected voidm(){}