What is the result?()
A. The code compiles and “s=” is printed.
B. The code compiles and “s=null” is printed.
C. The code does not compile because Strings is not initialized.
D. The code does not compile because because Strings cannot be referneed.
E. The code comiles.butt a NullPointerException is thrown when toString is called.
您可能感兴趣的试卷
你可能感兴趣的试题
A. Char ch = “a”;
B. char ch = “”;
C. char ch = “café”;
D. char ch = “ucafe”;
E. char ch = “ucafe’;
F. char ch = “u10100’;
G. char ch = (char) true;
Which three logical expressions evaluate to true?()
A. (a = = c)
B. (d = = c)
C. (b = = d)
D. (a = = b)
E. (b = = c)
F. (d == 10.0)
What is the result? ()
A. The program prints “lava”.
B. The program prints “java”.
C. An error at line 7 causes compilation to fail.
D. Complication succeeds but the program throws an exception.
}
What is the result?()
A. Compilation succeeds and 1 is printed.
B. Compilation succeeds and 2 is printed.
C. An error at line 8 causes compilation to fail.
D. An error at line 14 causes compilation to fail.
A. */*
B. /*.do
C. myServlet
D. /Myservlet
E. /MyServlet/*
F. MyServlet/*.isp
A. PUT
B. GET
C. INFO
D. POST
E. HEAD
F. TRACE
A. response.get writer ()
B. response.get Output Stream ()
C. response.getOutput Writer()
D. response.get Writer ().get Output Stream ()
E. response.get Writer (Writer.OUTPUT_BINARY)
Which additions needs to be made to the Iterate Handler class for it to properly perform as the tag handler for the loop tag.?()
A.A
B.B
C.C
D.D
Given
1. public class Foo {
2. public static void main (String [] args) }
3. try { return;}
4. finally { Syste.out.printIn (“Finally”);}
5. }
6. }
What is the result()?
A. The program runs and prints nothing.
B. The program runs and prints “Finally”.
C. The code comiles. But an exception is thrown at runtime.
D. The code will not compile because the catch block is missing.
Given:
1. public interface Foo {
2. int k = 4:
3. }
Which three are equivalent to line 2?()
A. final int k = 4:
B. public int k = 4:
C. static int k = 4:
D. private int k = 4:
E. abstract int k = 4:
F. volatile int k = 4:
G. transient int k = 4:
H. protected int k = 4:
最新试题
Which two classes or interfaces provide a getSession method?()
Given a web application in which the request parameter product ID contains a product identifier.Which two EL expressions evaluate the value of the product ID?()
Which three can be placed at line 23 to retrieve an existing HttpSession object?()
Which the three EL expressions, inserted at line 15, are valid and evaluate to "3"? ()
A session-scoped attribute, product, is stored by a servlet. That servlet then forwards to a JSP page. This attribute holds an instance of the com.Company. Product class with a name property of “The Matrix” and price property of 39.95. Given the JSP page code snippet:What is the response output of this JSP page code snippet? ()
Which three are guaranteed to be valid for the element of a web application deployment descriptor?()
A web application uses the HttpSession mechanism to determine if a user is “logged in”. When a user supplies a valid user name and password, an HttpSession is created for that user. The user has access to the application for only 15 minutes after logging in. The code must determine how long the user has been logged in, and if this time is greater than 15 minutes, must destroy the HttpSession. Which method in HttpSession is used to accomplish this?()
A developer for the Company.com web site has been told that users may turn off cookie support in their browsers. What must the developer do to ensure that these customers can still use the web application?()
For a given product instance, which three jsp:setProperty attributes must be used to initialized its properties form the HTML form? ()
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?()