下载此文档

北京达内科技有限公司Java培训讲师.docx


文档分类:管理/人力资源 | 页数:约15页 举报非法文档有奖
1/15
下载提示
  • 1.该资料是网友上传的,本站提供全文预览,预览什么样,下载就什么样。
  • 2.下载该文档所得收入归上传者、原创者。
  • 3.下载的文档,不会出现我们的网址水印。
1/15 下载此文档
文档列表 文档介绍
选择题
1:在软件生命周期中,下列哪个说法是不准确的 ?
厂 、开发和运行三个阶段

「C•在开发后期要进行编写代码和软件测试

2:
Which is the most appropriate code sn ippet that can be in serted at line 18 in the follow ing code?
(Assume that the code is compiled and run with assert ions en abled)
import .*;
2.
public class AssertTest
{
private HashMap cctld;
6.
public AssertTest()
8.
{
9.
cctld = new HashMap();
10.
("i n", "In dia");
11.
("uk", "United Kingdom");
12.
("au", "Australia");
13.
// more code...
}
// other methods ....
public String getCountry(String countryCode)
{
// What should be inserted here?
String country = (String)(countryCode);
return country;
}
}
Which is the most appropriate code snippet that can be inserted at line 18 in the following code?
(Assume that the code is compiled and run with assertions enabled)
import .*;
2.
public class AssertTest
{
private HashMap cctld;
6.
7. public AssertTest()
{
cctld = new HashMap();
("in", "India");
("uk", "United Kingdom");
("au", "Australia");
// more code...
}
// other methods ....
16.
17.
18.
19.
20.
21.
22. }
r
public String getCo un try(Stri ng coun tryCode)
{
// What should be in serted here?
String country = (Stri ng)(co un tryCode);
return coun try;
}
assert coun tryCode != n ull;
r
assert coun tryCode != n ull : "Co untry code can not be nu II";
r
assert cctld != n ull : "No country code data is available";
r
assert cctld : "No country code data is available";
3:
Give the follow ing code:
public class Example{
public static void main(String args[] ){
in t l=0;
do{
( "ItCforrlgis: ” +l);
}while(--l>0)
( “ Finish ” );
}
}
Which well be output:
Give the follow ing code:
public class Example{
public static void main(String args[] ){
in t l=0;
do{
( “ Doing it for l is: ” +l);

北京达内科技有限公司Java培训讲师 来自淘豆网m.daumloan.com转载请标明出处.

非法内容举报中心
文档信息