单项选择题

What is the result()?

A. Compilation will succeed.
B. Compilation will fail at line 5.
C. Compilation will fail at line 6.
D. Compilation will fail at line 14.
E. Compilation will fail at line 17.


您可能感兴趣的试卷

你可能感兴趣的试题

1.单项选择题


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.

2.多项选择题Which two are valid declarations of char?()

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;

3.多项选择题


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)

4.单项选择题


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.

5.单项选择题

}
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.

6.多项选择题Which thethree are valid URL mappings to a servlet in a web deployment descriptor? ()

A. */*
B. /*.do
C. myServlet
D. /Myservlet
E. /MyServlet/*
F. MyServlet/*.isp

8.多项选择题For a given Servlet Response response, which retrieves an object for writing binary data? ()

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)

10.单项选择题

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.

最新试题

Which three can be placed at line 23 to retrieve an existing HttpSession object?()

题型:多项选择题

Which three are guaranteed to be valid for the  element of a web application deployment descriptor?()

题型:多项选择题

Which the three interfaces need to be declared in the web application deployment descriptor? ()

题型:多项选择题

Assume session is an HttpSession, and is not referenced anywhere else in ServletA. Which two changes, taken together, ensure that value is equal to “Hello” on line 23? ()

题型:多项选择题

Which statement, at line 16, retrieves an InputStream for the file /WEBINF/ nyresrc.bin()?

题型:单项选择题

Given the HttpServlet code:  getServletContext().setAttribute(“foo”, “value”);What is the result?()

题型:单项选择题

What else must the developer do to ensure that the intended security goal is achieved()?  

题型:单项选择题

What code, inserted at line 21, is called prior to a session being migrated to a different JVM assuming the web application containing MyExample is deployed in a container which supports distributed applications?()

题型:单项选择题

Which the three are true about servlet filters?()

题型:多项选择题

Which two are true()

题型:多项选择题