Given:5.publicclassMyTagHandlerextendsTagSupport{6.publicintdoStartTag()throwsJspException{7.try{8.//insertcodehere9.}catch(Exceptionex){/*handleexception*/}10.returnsuper.doStartTag();11.}...42.}Whichcodesnippet,insertedatline8,causesthevaluefootobeoutpu

题目

Given:5.publicclassMyTagHandlerextendsTagSupport{6.publicintdoStartTag()throwsJspException{7.try{8.//insertcodehere9.}catch(Exceptionex){/*handleexception*/}10.returnsuper.doStartTag();11.}...42.}Whichcodesnippet,insertedatline8,causesthevaluefootobeoutput?()

A.JspWriterw=pageContext.getOut();

B.print("foo");

C.JspWriterw=pageContext.getWriter();

D.JspWriterw=newJspWriter(pageContext.getWriter());.w.print("foo");


相似考题
更多“Given:5.publicclassMyTagHandlerextendsTagSupport{6.publicintdoStartTag()throwsJspException ”相关问题
  • 第1题:

    He was() from his position as the president of the university.

    A、moved

    B、removed

    C、awarded

    D、given


    参考答案:B

  • 第2题:

    There was a very interesting remark in a book by an Englishman that I read recently( )what he thought was a reason for this American characteristic.

    A.giving
    B.gave
    C.to give
    D.given

    答案:A
    解析:
    该题考查非谓语动词。其中介词短语by an Englishman与定语从句that I read recently都做定语修饰book。可见空格处应填一分词做定语修饰remark,而what he thought...characteristic做分词的宾语,其中he thought为插入语。由此排除B,C选项.根据句意,remark与give应是主动关系,故排除选项D.答案为A。

  • 第3题:

    ___ more care, the flowers might have grown much better than now.

    A.Having given

    B.Giving

    C.To give

    D.Given

    答案:D
    解析:
    本题主要考查非谓语动词用法,题目意为“如果之前能多关心一些,这些花很可能会比现在长势好的多。”
      过去分词given+词,表示假设的情况,表示假设的情况,相当于一个条件句“If they had been given...”,非真实条件句,当从句的主语与主句的主语相同时,可以改为非谓语(现在分词或过去分词)的省略形式,但不能用完成时态。本句中主语是花,关怀是人给予花的,所以选择过去分词表示被动语态。
      

  • 第4题:

    [A] set [B] exact [C] given [D] placed


    正确答案:A

  • 第5题:

    ( ) more care, the flowers might have grown much better than now.

    A. Having given
    B. Giving
    C. To give
    D. Given

    答案:D
    解析:
    考查非谓语动词,主语是flowers,花与照料、打理逻辑上是被动关系,在选项中A、B是主动形式,C是不定式,只有D是被动的,故D选项正确。