单项选择题

What is the result?()

A. foo has the value of “”
B. foo hast he falue of null.
C. foo has the value of “blue”
D. foo has the value of “green”
E. An exception is thrown.
F. The code will not compile.


您可能感兴趣的试卷

你可能感兴趣的试题

2.单项选择题


What is the result?()

A. The program runs and prints nothing.
B. The program runs and prints “Equal”.
C. An error at line 5 cause compilation to fail.
D. The program runs but aborts with an exception.

3.单项选择题


What is the result?()

A. The program runs and prints “0”
B. The program runs and prints “1”
C. The program runs but aborts with an exception.
D. An error “possible undefined variable” at line 4 causes compilation to fail.
E. An error “possible undefined variable” at line 9 cause compilation to fail.

4.单项选择题


What is the result()?  

A. 2
B. 4
C. 8
D. 16
E. The code will not compile.

5.多项选择题Which the two demonstrate an “is a” relationship?()

A. public interface Person {}  Public class Employee extends Person {}
B. public interface Shape {}  public interface Rectangle extends Shape {}
C. public interface Color {}  public class Shape { private Color color; }
D. public class Species {}  public class Animal { private Species species; }
E. interface Component {} Class Container implements Component {private Component [] children;

6.多项选择题


Which two overload the setVar method()

A.A
B.B
C.C
D.D
E.E

7.单项选择题Which thefollowingstatements about static inner classes is true?()

A. An anonymous class can be declared as static.
B. A static inner class cannot be a static member of the outer class.
C. A static inner class does not require an instance of the enclosing class.
D. Instance member of a static inner class can be referenced using the class name of the staticinner class.

8.多项选择题Which the following two statements are true?()

A. An inner class may be declared as static.
B. An anonymous inner class can be declared as public.
C. An anonymous inner class can be declared as private.
D. An anonymous inner class can extend an abstract class.
E. An anonymous inner class can be declared as protected.

9.多项选择题Under what two circumstances is the set JspBody method NOT called in a tag class that implements the Simple Tag interface? ()

A. The tag is invoked without a body.
B. The doTAb method throws an exception.
C. The  element has the value empty.
D. The tag is called with the attribute skip-body=true

最新试题

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

题型:多项选择题

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

题型:多项选择题

Which two are true()

题型:多项选择题

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

题型:多项选择题

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

题型:单项选择题

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

题型:单项选择题

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 the JSTL code snippet can be used to import content from another web resource?()

题型:单项选择题

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

题型:单项选择题

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

题型:多项选择题