单项选择题

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


您可能感兴趣的试卷

你可能感兴趣的试题

1.多项选择题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

3.多项选择题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)

5.单项选择题

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.

6.多项选择题

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:

7.单项选择题


Which command line invocation will produce the output?()

A. java Test 2222
B. java Test 1234
C. java Test 4242
D. java Test 4321

8.单项选择题What is the numerical range of char?()

A. 0…32767
B. 0…65535
C. –256…255
D. 32768…32767
E. Range is platform dependent.

9.多项选择题

Given: 
Integer i = new Integer (42); 
Long l = new Long (42); 
Double d = new Double (42.0);  
Which two expression evaluate to true?()

A. (i = = l)
B. (i = = d)
C. (d = = l)
D. (i.equals(d))
E. (i.equals(i))
F. (i.equals(42))

10.多项选择题

Given: 
1.  public class ConstOver { 
2.  public constOver(int x, int y, int z) { 
3.  } 
4.  }  
Which two overload the ConstOver Constructor?()

A. ConstOver() {}
B. protected int ConstOver(){}
C. private ConstOver(int z, int y, byte x ) {}
D. public Object ConstOver(Int x, int y, int z) {}
E. pubic void ConstOver (byte x, byte y, byte z) {}

最新试题

Which the two are true regarding a web application class loader?()

题型:多项选择题

Assume the tag handler for a st:simpletag extends SimpleTagSupport. In what way can scriptlet code be used in the body of st:simple?()

题型:单项选择题

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? ()

题型:单项选择题

The tag handler for n:recurse extends SimpleTagSupport.Assuming an n:recurse tag can either contain an empty body or another n:recurse tag, which strategy allows the tag handler for n:recurse to output the nesting depth of the deepest n:recurse tag?()  

题型:单项选择题

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 is the true choice about the web container request processing model()?

题型:单项选择题

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

题型:单项选择题

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?()

题型:单项选择题

Within the web application deployment descriptor, which defines a valid JNDI environment entry()

题型:单项选择题

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?()

题型:单项选择题