Given: 6.<myTag:foo bar=&r

题目

Given: 6. 7.<%="processing" %> 8. and a custom tag handler for foo which extends TagSupport. Which two are true about thetag handler referenced by foo?()

  • A、The doStartTag method is called once.
  • B、The doAfterBody method is NOT called.
  • C、The EVAL_PAGE constant is a valid return value for the doEndTag method.
  • D、The SKIP_PAGE constant is a valid return value for the doStartTag method.
  • E、The EVAL_BODY_BUFFERED constant is a valid return value for the doStartTag method.
如果没有搜索结果或未解决您的问题,请直接 联系老师 获取答案。
相似问题和答案

第1题:

GiventheJSPcode:<%request.setAttribute("foo","bar");%>andtheClassictaghandlercode:5.publicintdoStartTag()throwsJspException{6.//insertcodehere7.//returnint8.}Assumetherearenoother"foo"attributesinthewebapplication.WhichinvocationonthepageContextobject,insertedatline6,assigns"bar"tothevariablex?()

A.Stringx=(String)pageContext.getAttribute("foo")

B.Stringx=(String)pageContext.getRequestScope("foo")

C.ItisNOTpossibletoaccessthepageContextobjectfromwithindoStartTag

D.Stringx=(String)pageContext.getRequest().getAttribute("foo")

E.Stringx=(String)pageContext.getAttribute("foo",PageContext.ANY_SCOPE)


参考答案:D

第2题:

Click the Exhibit button. Given the fully-qualified class names: com.foo.bar.Dog com.foo.bar.blatz.Book com.bar.Car com.bar.blatz.Sun Which graph represents the correct directory structure for a JAR file from which those classes can be used by the compiler and JVM? ()

A.Jar A

B.Jar B

C.Jar C

D.Jar D

E.Jar E


参考答案:A

第3题:

Given:fooandbararepublicreferencesavailabletomanyotherthreads,fooreferstoaThreadandbarisanObject.Thethreadfooiscurrentlyexecutingbar.wait().Fromanotherthread,whatprovidesthemostreliablewaytoensurethatfoowillstopexecutingwait()?()

A.foo.notify();

B.bar.notify();

C.foo.notifyAll();

D.Thread.notify();

E.bar.notifyAll();

F.Object.notify();


参考答案:E

第4题:

You have read/write permission on an ordinary file foo. You have just run In foo bar. What would happen if you ran rm foo?()

  • A、 foo and bar would both be removed.
  • B、 foo would be removed while bar would remain accessible.
  • C、 foo would be removed, bar would still exist but would be unusable.
  • D、 Both foo and bar would remain accessible.
  • E、 You would be asked whether bar should be removed.

正确答案:B

第5题:

Given:fooandbararepublicreferencesavailabletomanyotherthreads.fooreferstoaThreadandbarisanObject.Thethreadfooiscurrentlyexecutingbar.wait().Fromanotherthread,whatprovidesthemostreliablewaytoensurethatfoowillstopexecutingwait()?

A.foo.notify();

B.bar.notify();

C.foo.notifyAll();

D.Thread.notify();

E.bar.notifyAll();


参考答案:E

第6题:

Giventhefully-qualifiedclassnames:com.foo.bar.Dogcom.foo.bar.blatz.Bookcom.bar.Carcom.bar.blatz.SunWhichgraphrepresentsthecorrectdirectorystructureforaJARfilefromwhichthoseclassescanbeusedbythecompilerandJYM?()

A.JarA

B.JarB

C.JarC

D.JarD

E.JarE


参考答案:A

第7题:

Given:Which code, inserted at line 15, allows the class Sprite to compile?()

A.Foo { public int bar() { return 1; }

B.new Foo { public int bar() { return 1; }

C.new Foo() { public int bar() { return 1; }

D.new class Foo { public int bar() { return 1; }


参考答案:C

第8题:

Acustomtagisdefinedtotakethreeattributes.WhichtwocorrectlyinvokethetagwithinaJSPpage?()

A.<prefix:myTaga="foo"b="bar"c="baz"/>

B.<prefix:myTagattributes={"foo","bar","baz"}/>

C.<prefix:myTagjsp:attributea="foo"b="bar"c="baz"/>

D.<prefix:myTag><jsp:attributename="a">foo</jsp:attribute><jsp:attributename="b">bar</jsp:attribute><jsp:attributename="c">baz</jsp:attribute>.</prefix:myTag>


参考答案:A, B, D

第9题:

Given: 6.<% int[] nums = {42, 420, 4200}; 7.request.setAttribute("foo", nums); %> Which two successfully translate and result in a value of true?()

  • A、${true or false}
  • B、${requestScope[foo][0] > 500}
  • C、${requestScope[’foo’][1] = 420}
  • D、${(requestScope[’foo’][0] lt 50) && (3 gt 2)}

正确答案:A,D

第10题:

Which code determines the int value foo closest to a double value bar?()  

  • A、 Int foo = (int) Math.max(bar);
  • B、 Int foo = (int) Math.min(bar);
  • C、 Int foo = (int) Math.abs(bar);
  • D、 Int foo = (int) Math.ceil(bar);
  • E、 Int foo = (int) Math.floor(bar);
  • F、 Int foo = (int) Math.round(bar);

正确答案:F

更多相关问题