单选题Given: 10.public void service(ServletRequest request, 11.ServletResponse response) { 12.ServletInputStream sis = 13.// insert code here 14.} Which retrieves the binary input stream on line 13?()A request.getWriter();B request.getReader();C request.getI

题目
单选题
Given: 10.public void service(ServletRequest request, 11.ServletResponse response) { 12.ServletInputStream sis = 13.// insert code here 14.} Which retrieves the binary input stream on line 13?()
A

request.getWriter();

B

request.getReader();

C

request.getInputStream();

D

request.getResourceAsStream();


相似考题
更多“单选题Given: 10.public void service(ServletRequest request, 11.ServletResponse response) { 12.ServletInputStream sis = 13.// insert code here 14.} Which retrieves the binary input stream on line 13?()A request.getWriter();B request.getReader();C request.getI”相关问题
  • 第1题:

    class One {  void foo() {}  }  class Two extends One {   //insert method here  }  Which three methods, inserted individually at line 14, will correctly complete class Two?()

    • A、 int foo() { /* more code here */ }
    • B、 void foo() { /* more code here */ }
    • C、 public void foo() { /* more code here */ }
    • D、 private void foo() { /* more code here */ }
    • E、 protected void foo() { /* more code here */ }

    正确答案:B,C,E

  • 第2题:

    Given: 11.public class MyServlet extends HttpServlet { 12.public void service(HttpServletRequest request, 13.HttpServletResponse response) 14.throws ServletException, IOException { 15.// insert code here 16.} 17.} and this element in the web application’s deployment descriptor: 302 /html/error.html Which,inserted at line 15,causes the container to redirect control to the error.html resource?()

    • A、response.setError(302);
    • B、response.sendError(302);
    • C、response.setStatus(302);
    • D、response.sendRedirect(302);
    • E、response.sendErrorRedirect(302);

    正确答案:B

  • 第3题:

    Given: 10.public void service(ServletRequest request, 11.ServletResponse response) { 12.ServletInputStream sis = 13.// insert code here 14.} Which retrieves the binary input stream on line 13?()

    • A、request.getWriter();
    • B、request.getReader();
    • C、request.getInputStream();
    • D、request.getResourceAsStream();

    正确答案:C

  • 第4题:

    11. rbo = new ReallyBigObject();  12. // more code here  13. rbo = null;  14. /* insert code here */  Which statement should be placed at line 14 to suggest that the virtual machine expend effort toward recycling the memory used by the object rbo?() 

    • A、 System.gc();
    • B、 Runtime.gc();
    • C、 System.freeMemory();
    • D、 Runtime.getRuntime().growHeap();
    • E、 Runtime.getRuntime().freeMemory();

    正确答案:A

  • 第5题:

    Given:   10. class One {   11. void foo() { }   12. }   13. class Two extends One {   14. //insert method here   15. }   Which three methods, inserted individually at line 14, will correctly complete class Two?()

    • A、 public void foo() { /* more code here */ }
    • B、 private void foo() { /* more code here */ }
    • C、 protected void foo() { /* more code here */ }
    • D、 int foo() { /* more code here */ }  
    • E、 void foo() { /* more code here */ }

    正确答案:A,C,E

  • 第6题:

    单选题
    11.public class Counter{ 12.public static void main(String[]args){ 13.int numArgs=/*insert code here*/; 14.} 15.} and the command line:java Counter one fred 42 Which code,inserted at line 13,captures the number of arguments passed into the program?()
    A

    args.count

    B

    args.length

    C

    args.count()

    D

    args.length()

    E

    args.getLength()


    正确答案: C
    解析: 暂无解析

  • 第7题:

    单选题
    11. public class Counter {  12. public static void main(String[] args) {  13. int numArgs = /* insert code here */;  14. }  15. }  and the command line: java Counter one fred 42 Which code, inserted at line 13, captures the number of arguments passed into the program?()
    A

     args.count

    B

     args.length

    C

     args.count()

    D

     args.length()

    E

     args.getLength()


    正确答案: C
    解析: 暂无解析

  • 第8题:

    单选题
    Given: 10.public void service(ServletRequest request, 11.ServletResponse response) { 12.ServletInputStream sis = 13.// insert code here 14.} Which retrieves the binary input stream on line 13?()
    A

    request.getWriter();

    B

    request.getReader();

    C

    request.getInputStream();

    D

    request.getResourceAsStream();


    正确答案: C
    解析: 暂无解析

  • 第9题:

    单选题
    Given: 11.double input = 314159.26; 12.NumberFormat nf = NumberFormat.getInstance(Locale.ITALIAN); 13.String b; 14.//insert code here Which code, inserted at line 14, sets the value of b to 314.159,26?()
    A

    b = nf.parse( input );

    B

    b = nf.format( input );

    C

    b = nf.equals( input );

    D

    b = nf.parseObject( input );


    正确答案: C
    解析: 暂无解析

  • 第10题:

    多选题
    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)


    正确答案: E,A
    解析: 暂无解析

  • 第11题:

    单选题
    11. double input = 314159.26;  12. NumberFormat nf= NumberFormat.getInstance(Locale.ITALIAN);  13. String b;  14. //insert code here  Which code, inserted at line 14, sets the value of b to 3 14.159,26?()
    A

     b = nf.parse( input);

    B

     b = nf.format( input);

    C

     b = nf.equals( input);

    D

     b = nf.parseObject( input);


    正确答案: D
    解析: 暂无解析

  • 第12题:

    单选题
    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):


    正确答案: C
    解析: 暂无解析

  • 第13题:

    11. public class Counter {  12. public static void main(String[] args) {  13. int numArgs = /* insert code here */;  14. }  15. }  and the command line: java Counter one fred 42 Which code, inserted at line 13, captures the number of arguments passed into the program?() 

    • A、 args.count
    • B、 args.length
    • C、 args.count()
    • D、 args.length()
    • E、 args.getLength()

    正确答案:B

  • 第14题:

    Given a Filter class definition with this method: 21.public void doFilter(ServletRequest request, 22.ServletResponse response, 23.FilterChain chain) 24.throws ServletException, IOException { 25.// insert code here26. } Which should you insert at line 25 to properly invoke the next filter in the chain,or the target servlet if thereare no more filters?()

    • A、chain.forward(request, response);
    • B、chain.doFilter(request, response);
    • C、request.forward(request, response);
    • D、request.doFilter(request, response);

    正确答案:B

  • 第15题:

    11. double input = 314159.26;  12. NumberFormat nf= NumberFormat.getInstance(Locale.ITALIAN);  13. String b;  14. //insert code here  Which code, inserted at line 14, sets the value of b to 3 14.159,26?() 

    • A、 b = nf.parse( input);
    • B、 b = nf.format( input);
    • C、 b = nf.equals( input);
    • D、 b = nf.parseObject( input);

    正确答案:B

  • 第16题:

    10. class Line {  11. public class Point { public int x,y; }  12. public Point getPoint() { return new Point(); }  13. }  14. class Triangle {  15. public Triangle() {  16. // insert code here  17. }  18. }  Which code, inserted at line 16, correctly retrieves a local instance of a Point object?() 

    • A、 Point p = Line.getPoint();
    • B、 Line.Point p = Line.getPoint();
    • C、 Point p = (new Line()).getPoint();
    • D、 Line.Point p = (new Line()).getPoint();

    正确答案:D

  • 第17题:

    Given 11.public interface Status { 12./* insert code here */ int MY_VALUE = 10; 13.} Which three are valid on line 12?()

    • A、final
    • B、static
    • C、native
    • D、public
    • E、private

    正确答案:A,B,D

  • 第18题:

    多选题
    Given:   10. class One {   11. void foo() { }   12. }   13. class Two extends One {   14. //insert method here   15. }   Which three methods, inserted individually at line 14, will correctly complete class Two?()
    A

    public void foo() { /* more code here */ }

    B

    private void foo() { /* more code here */ }

    C

    protected void foo() { /* more code here */ }

    D

    int foo() { /* more code here */ }

    E

    void foo() { /* more code here */ }


    正确答案: A,C,E
    解析: 暂无解析

  • 第19题:

    多选题
    Given: Which three methods, inserted individually at line 14, will correctly complete class Two?()
    A

    int foo() { /* more code here */ }

    B

    void foo() { /* more code here */ }

    C

    public void foo() { /* more code here */ }

    D

    private void foo() { /* more code here */ }

    E

    protected void foo() { /* more code here */ }


    正确答案: D,B
    解析: 暂无解析

  • 第20题:

    多选题
    Given:   11. // insert code here   12. private N min, max;   13. public N getMin() { return min; }   14. public N getMax() { return max; }   15. public void add(N added) {   16. if (min == null || added.doubleValue()  max.doubleValue())  19. max = added;   20. }   21. }   Which two, inserted at line 11, will allow the code to compile?()
    A

    A

    B

    B

    C

    C

    D

    D

    E

    E

    F

    F


    正确答案: B,A
    解析: 暂无解析

  • 第21题:

    多选题
    Given 11.public interface Status { 12./* insert code here */ int MY_VALUE = 10; 13.} Which three are valid on line 12?()
    A

    final

    B

    static

    C

    native

    D

    public

    E

    private


    正确答案: B,C
    解析: 暂无解析

  • 第22题:

    单选题
    10. class Line {  11. public class Point { public int x,y; }  12. public Point getPoint() { return new Point(); }  13. }  14. class Triangle {  15. public Triangle() {  16. // insert code here  17. }  18. }  Which code, inserted at line 16, correctly retrieves a local instance of a Point object?()
    A

     Point p = Line.getPoint();

    B

     Line.Point p = Line.getPoint();

    C

     Point p = (new Line()).getPoint();

    D

     Line.Point p = (new Line()).getPoint();


    正确答案: A
    解析: 暂无解析

  • 第23题:

    多选题
    11. public interface Status {  12. /* insert code here */ int MY_VALUE = 10;  13. }  Which three are valid on line 12?()
    A

    final

    B

    static

    C

    native

    D

    public

    E

    private

    F

    abstract

    G

    protected


    正确答案: G,A
    解析: 暂无解析

  • 第24题:

    单选题
    Given a Filter class definition with this method: 21.public void doFilter(ServletRequest request, 22.ServletResponse response, 23.FilterChain chain) 24.throws ServletException, IOException { 25.// insert code here 26.} Which should you insert at line 25 to properly invoke the next filter in the chain, or the target servlet if thereare no more filters?()
    A

    chain.forward(request, response);

    B

    chain.doFilter(request, response);

    C

    request.forward(request, response);

    D

    request.doFilter(request, response);


    正确答案: A
    解析: 暂无解析