单项选择题


Which statement at Point X on line 1 allows this code to compile and run?()

A. import java.io.*.;
B. include java.io.*;
C. import java.io.PrintWriter;
D. include java.io.PrintWRiter;
E. No statement in needed.


您可能感兴趣的试卷

你可能感兴趣的试题

1.单项选择题


What is the final value of i?()

A. 1
B. 2
C. 3
D. 4
E. 5

2.多项选择题


Which two are valid examples of method overriding?()

A. float getVar() {return x:}
B. public float getVar() {return x; }
C. public double getVar() {return x; }
D. protected float getVar() {return x; }
E. public float getVar(float f) {return f;}

3.多项选择题


Which two are true? ()

A. The foo initialization parameter CANNOT be set programmatically.
B. Compilation fails because getlnitParameter returns type Object.
C. The foo initialization parameter is NOT a servlet initialization parameter.
D. Compilation fails because ServletContext does NOT have a getlnitParameter method.
E. The foo parameter must de defined within the  element of the deployment  descriptor.
F. The foo initialization parameter can also be retrievedusing getSErvletConfig().  GetlnitParameter (“foo”).

4.多项选择题Given a header in an HTTP request: X-Retries:4  Which two retrieve the value of the header from a given ServletRequest request? ()

A. request.getHeader (“X-Retries”)
B. request.getIntHeader (“X-Retries”)
C. request.getRequestHeader (“x-Retries”)
D. request.getHeaders (“X-Retries”).get (0)
E. re request.getRequest Headers (“X-Retries”). Get (0)

5.单项选择题


After execution. What are the values for I and j?()

A. i = 6 and j = 5
B. i = 5 and j = 5
C. i = 6 and j = 4
D. i = 5 and j = 6
E. i = 6 and j = 6

6.单项选择题

When is the Float object. Created in line 3. eligible for garbage collection?()

A. just after line 5
B. just after line 6
C. just after line 7 (That is. As the method returns)
D. Never in this method

7.单项选择题Which is the valid identifier?()

A. false
B. default
C. _object
D. a-class

8.多项选择题Which the two choices are equivalent?()

A. 3 / 2
B. 3 < 2
C. 3 * 4
D. 3 << 2
E. 3 * 22
F. 3 <<<2

9.单项选择题


Which statement is true?()

A. The MyCircle class is full encapsulated.
B. The diameter of a given MyCircle is guaranteed to be twice its radius.
C. Lines 6 and 7 should be in a synchronized block to ensure encapsulation.
D. The radius of a MyCircle object can be set without affecting its diameter.

最新试题

Which two authentication mechanisms provide weaker protection than other mechanisms?()

题型:多项选择题

Which the two are characteristics of the Service Locator pattern?()

题型:多项选择题

Which the three are true about servlet filters?()

题型:多项选择题

Which the JSTL code snippet can be used to import content from another web resource?()

题型:单项选择题

A custom JSP tag must be able to support an arbitrary number of attributes whose names are unknown when the tag class is designed. Which two are true? ()

题型:多项选择题

A JSP page, current.jsp, is created to display the current weather report. The weather report is contained in a weather.html page that is rewritten every five minutes. Which line, appearing in current.jsp, ensures that the most recent version of weather.html is included whenever current.jsp is referenced?()

题型:单项选择题

Which two are true()

题型:多项选择题

A developer is designing a web application which extensively uses EJBs and JMS. The developer finds that there is a lot of duplicated code to build the JNDI contexts to access the beans and queues. Further, because of the complexity, there are numerous errors in the code. Which J2EE design pattern provides a solution for this problem?()

题型:单项选择题

For a given product instance, which three jsp:setProperty attributes must be used to initialized its properties form the HTML form? ()

题型:多项选择题

Which the two are valid and equivalent?()

题型:多项选择题