CMS专题

单选题Assume a JavaBean com.example.GradedTestBean exists and has two attributes. The attribute name is oftype java.lang.String and the attribute score is of type java.lang.Integer. An array of com.example. GradedTestBean objects is exposed to the page in a 

题目
单选题
Assume a JavaBean com.example.GradedTestBean exists and has two attributes. The attribute name is oftype java.lang.String and the attribute score is of type java.lang.Integer. An array of com.example. GradedTestBean objects is exposed to the page in a request- scoped attribute called results. Additionally,an empty java.util.HashMap called resultMap is placed in the page scope. A JSP page needs to add the firstentry in results to resultMap, storing the name attribute of the bean as the key and the score attribute of thebean as the value. Which code snippet of JSTL code satisfies this requirement?()
A

${resultMap[results[0].name] = results[0].score}

B

<c:set var=${resultMap} key=${results[0].name} value=${results[0].score} />

C

<c:set var=resultMap property=${results[0].name}> ${results[0].value}</c:set>

D

<c:set var=resultMap property=${results[0].name} value=${results[0].score} />

E

<c:set target=${resultMap} property=${results[0].name} value=${results[0].score} />

如果没有搜索结果,请直接 联系老师 获取答案。
如果没有搜索结果,请直接 联系老师 获取答案。
相似问题和答案

第1题:

以下关于JavaBean的说法中,错误的是( )。

A.JavaBean是基于JA V A语言的

B.JavaBean是JSP的内置对象之一

C.JavaBean是一种Java类

D.JavaBean是一个可重复使用的软件组件


参考答案B

第2题:

If during discharging the Captain for fear of vessel being frozen in deems it advisable to leave, he has liberty to do so. This sentence says that ________ .

A.fearing the vessel being frozen in the Captain has liberty to discharge the cargo

B.the vessel can stop discharging and leave the unloading port if the risk of being frozen in exists.

C.the Captain has liberty to leave the discharging port if there is no risk of being frozen in

D.the Captain deems it advisable to leave the discharging port


正确答案:B

第3题:

There are4 words marked A), B), C) and D ) in each group. Choose the one which underlined part has a different pronunciation from the other three ________.

A.butter

B.mute

C.mule

D.assume


参考答案:A

第4题:

以下关于JavaBean的说法中,错误的是()。

  • A、JavaBean是基于JAVA语言的
  • B、JavaBean是JSP的内置对象之一
  • C、JavaBean是一种Java类
  • D、JavaBean是一个可重复使用的软件组件

正确答案:B

第5题:

A vessel hearing a fog signal forward of her beam has not determined if risk of collision exists. She shall reduce speed to ______.

A.moderate speed

B.safe speed

C.half speed

D.bare steerageway


正确答案:D

第6题:

在JSP中,使用动作可以将JavaBean嵌入JSP页面,对JavaBean的访问范围不能是()。

A、page

B、request

C、response

D、application


参考答案:C

第7题:

A Certificate of Financial Responsibility attests that the vessel ______.

A.has financial backing to meet any liability resulting from the discharge of oil

B.has the minimum required amount of P & I and hull insurance

C.will assume the responsibility for any damage or loss to the shipper

D.has financial reserves to meet reasonable expected crew costs of an intended voyage


正确答案:A

第8题:

(b) (i) Calculate the inheritance tax (IHT) that will be payable if Debbie were to die today (8 June 2005).

Assume that no tax planning measures are taken and that there has been no change in the value of any

of the assets since David’s death. (4 marks)


正确答案:

 

第9题:

什么是JavaBean组件?使用JavaBean组件有什么优点?


正确答案: 现在软件开发都已经转向了基于组件的开发,目前具备代表性的组件技术有微软的COM、COM+,有Sun的JavaBean和EJB(Enterprise Java Bean),另外还有CORBA(Common Object Request Broker Architecture,公共对象请求代理结构)
JavaBean规范将“软件组件”的概念引入到Java编程的领域。组件是自包含的、可重用的软件单元;而JavaBean组件,则可以使用可视的应用程序开发工具,可视地将它们编写到Java程序中。JavaBean规范为Java开发人员提供了一种“组件化”其Java类的方法。

第10题:

以下对JavaBean的描述,()是错的。

  • A、JavaBean是一个公共(public)的类
  • B、JavaBean类的必须有一个无参数的构造函数
  • C、取得或者设置类属性的方法必须是getXXX()或者setXXX()
  • D、JavaBean不能封装对数据库的处理

正确答案:D

更多相关问题