java软件开发工程师笔试题
D.never in this method
12:
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)
1. import java.util.*;
2.
3. public class AssertTest
4. {
5. private HashMap cctld;
6.
7. public AssertTest()
8. {
9. cctld = new HashMap();
10. cctld.put("in", "India");
11. cctld.put("uk", "United Kingdom");
12. cctld.put("au", "Australia");
13. // more code...
14. }
www.77xue.com哦
15. // other methods ....
16. public String getCountry(String countryCode)
17. {
18. // What should be inserted here?
19. String country = (String)cctld.get(countryCode);
20. return country;
21. }
22. }
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)
1. import java.util.*;
2.
3. public class AssertTest
4. {
5. private HashMap cctld;
6.
7. public AssertTest()
8. {
9. cctld = new HashMap();
10. cctld.put("in", "India");
11. cctld.put("uk", "United Kingdom");
12. cctld.put("au", "Australia");
13. // more code...
14. }
15. // other methods ....
16. public String getCountry(String countryCode)
17. {
18. // What should be inserted here?
19. String country = (String)cctld.get(countryCode);
20. return country;
21. }
22. }
A.assert countryCode != null;
B.assert countryCode != null : "Country code can not be null" ;
C.assert cctld != null : "No country code data is available";
D.assert cctld : "No country code data is available";
13:
Give the following code:
public class Example{
public static void main(String args[] ){
int l=0;
do{
System.out.println(“Doing it for l is:”+l);
}while(--l>0)
System.out.println(“Finish”);
}
}
Which well be output:
Give the following code:
public class Example{
public static void main(String args[] ){
int l=0;
www.77xue.com哦
do{
System.out.println(“Doing it for l is:”+l);
}while(--l>0)
System.out.println(“Finish”);
}
}
Which well be output:
A.Doing it for l is 3
B.Doing it for l is 1
C.Doing it for l is 2
D.Doing it for l is 0
14:Which statements about Java code security are not true?
A.The bytecode verifier loads all classes needed for the execution of a program.
《java软件开发工程师笔试题》相关文章
- java软件开发工程师笔试题
- › JAVA程序员的个人简历模板
- › java软件工程师个人简历模板
- › java工程师简历模板
- › JAVA软件工程师个人简历范文
- › java工程师求职简历模板
- › java软件工程师求职简历
- › java软件工程师英文简历模板
- › java开发工程师个人简历表
- › 求职简历模板-java软件高级工程师
- › 电子商务java软件开发工程师简历范文
- › java高级工程师简历
- › java软件工程师简历
- 在百度中搜索相关文章:java软件开发工程师笔试题
- 在谷歌中搜索相关文章:java软件开发工程师笔试题
- 在soso中搜索相关文章:java软件开发工程师笔试题
- 在搜狗中搜索相关文章:java软件开发工程师笔试题