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.
您可能感兴趣的试卷
你可能感兴趣的试题
What is the result()?
A. 2
B. 4
C. 8
D. 16
E. The code will not compile.
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;
Which two overload the setVar method()
A.A
B.B
C.C
D.D
E.E
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.
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.
A. The tag is invoked without a body.
B. The doTAb method throws an exception.
C. The
D. The tag is called with the attribute skip-body=true
A. GET
B. INFO
C. HEAD
D. TRACE
E. OPTIONS
Which statement inserted at line II, retrieves the text from the second text field?()
A. second = request.getParameter (“foo”):
B. second = request.getParameter (“foo”, 1):
C. second = request.getParameter (“foo”,2):
D. second = request.getParameter (foo”) [1]:
E. second = request.getParameter Values (“foo”) [1]:
Which retrieves the binary input stream on line 13?()
A. request.get Writer ():
B. request.get Reader ():
C. request.get Input Stream():
D. request.get Resource As Stream():
E. request.get Resource As Stream (Servlet Request. REQUEST):
A. request.add Cookie (“username”. “joe”)
B. request.set Cookie (“username, “joe”)
C. response.add Cookie (username”, “joe”))
D. request.add Header (new Cookie (“username”, “joe”))
E. request.add Cookie (new Cookie (“username”, “joe”))
F. response.add Cookie (new Cookie (“username”, “joe”))
G. response.add Header (new Cookie (“username”, “joe”))
最新试题
Which code snippet, inserted at line 8, causes the value Company to be output?()
Given that session is a valid HttpSession object: Int max = session.getAttribute(“MyReallyLongName”); Which is true?()
Given a JSP error page, which implicit object refers to the uncaught Throwable that resulted in th epage being invoked?()
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?()
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?()
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?()
Which the two are true regarding a web application class loader?()
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? ()