首页 试题广场 > 试题详情
单选题

【C015417】在Spring配置文件中有如下代码段,下面的说法正确的是()。
<bean id="student" class="com.jbit.Student">
<property name="name" value="tom"/>
<property name="age" value="21"/>
</bean>

  • A.在类Student中需要有public void setname(String name)方法
  • B.在类Student中需要有private void setage(int age)方法
  • C.在类Student中需要有public void setName(String name)方法
  • D.在类Student中需要有private void setAge(int age)方法
提交并查看答案
下一题 上一题
Ke星伙伴们的回答/ 2个回答
关闭
关闭
QQ
交流群
邀请
好友
App
下载
意见
反馈
返回
顶部