无忧首页企业系统我的无忧
无忧服务:
兼职活动培训
娱乐交友:
交友社区资讯
全职实习:
实习暑假寒假
微信号:school51
扫一下,立即关注
加关注
在线支付,立省10元
下载新版APP
===大学生成长生活平台===

JAVA题库:格林模拟试题三(下)(4)

2012-12-26来源/作者:卫凯点击次数:491

 

question 41)

you are creating an application that has a form with a text entry field used to enter a persons age. which of the following is appropriate for capturing this information.


1) use the text field of a textfield and parse the result using integer
2) use the getinteger method of the textfield
3) use the gettext method of a textbox and parse the result using the getint method of integer class
4) use the gettext method of a textfield and use the parseint method of the integer class


question 42)

given the following declaration


integer i=new integer(99);


how can you now set the value of i to 10?


1) i=10;
2) i.setvalue(10);
3) i.parseint(10);
4) none of the above


question 43)

which of the following statements are true

1) constructors cannot be overloaded
2) constructors cannot be overridden
3) a constructor can return a primitive or an object reference
4) constructor code executes from the current class up the hierarchy to the ancestor class


question 44)

given a reference called

t

to a class which extends thread, which of the following will cause it to give up cycles to allow another thread to execute.

1) t.yield();
2) thread.yield();
3) yield(100); //or some other suitable amount in milliseconds
4) yield(t);





相关阅读



关于我们 | 联系我们 | 用户指南 | 网站地图 | 意见建议 | 会员注册 | 用户协议 | 隐私政策