<%! import java.util.*; %>
<%! import java.util.List;import java.util.ArrayList; %>
<%@ page import=’java.util.List’import=’java.util.ArrayList’ %>
<%@ import types=’java.util.List’types=’java.util.ArrayList’ %>
<%@ page import=’java.util.List,java.util.ArrayList’ %>
<%@ import types=’java.util.List,java.util.ArrayList’ %>
第1题:
You are writing a method to compress an array of bytes.The array is passed to the method in a parameter named document.You need to compress the incoming array of bytes and return the result as an array of bytes.Which code segment should you use?()
A.
B.
C.
D.
第2题:
One of the guidelines in writing the C code is as follows: write code that is as clear as(15).
A.readable
B.reusable
C.possible
D.semantic
第3题:
You are writing a method that accepts a string parameter named message.Your method must break the message parameter into individual lines of text and pass each line to a second method named Process.Which code segment should you use?()
A.
B.
C.
D.
第4题:
You are creating a new JSP page and you need to execute some code that acts when the page is firstexecuted, but only once. Which three are possible mechanisms for performing this initialization code?()
第5题:
A JSP page needs to perform some operations before servicing the first request. Where can this be done?()
第6题:
Formanageabilitypurposes,youhavebeentoldtoadda"count"instancevariabletoacriticalJSP DocumentsothataJMXMBeancantrackhowfrequentthisJSPisbeinginvoked.WhichJSPcodesnippetmustyouusetodeclarethisinstancevariableintheJSPDocument?()
A.<jsp:declaration>intcount=0;<jsp:declaration>
B.<%!intcount=0;%>
C.<jsp:declaration.instance>intcount=0;.<jsp:declaration.instance>
D.<jsp:scriptlet.declaration>intcount=0;.<jsp:scriptlet.declaration>
第7题:
For manageability purposes, you have been told to add a "count" instance variable to a critical JSP Document so that a JMX MBean can track how frequent this JSP is being invoked. Which JSP code snippetmust you use to declare this instance variable in the JSP Document?()
第8题:
You are writing an application that uses SOAP to exchange data with other applications.You use a Department class that inherits from ArrayList to send objects to another application.The Department object is named dept.You need to ensure that the application serializes the Department object for transport by using SOAP.Which code should you use?()
A.
B.
C.
D.
第9题:
You are writing a JSP that includes scriptlet code to declare a List variable and initializes that variable to anArrayList object. Which two JSP code snippets can you use to import these list types?()
第10题:
You have created a JSP that includes instance variables and a great deal of scriptlet code. Unfortunately,after extensive load testing, you have discovered several race conditions in your JSP scriptlet code. To fixthese problems would require significant recoding, but you are already behind schedule. Which JSP codesnippet can you use to resolve these concurrency problems?()