当前位置:七七学习网文档大全求职指南求职笔试面试笔试题目java软件开发工程师笔试题» 正文

java软件开发工程师笔试题

[10-10 21:21:19]   来源:http://www.77xue.com  笔试题目   阅读:8666
概要:D.never in this method12: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 AssertTest4. {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&
java软件开发工程师笔试题,标签:驾照笔试题目,腾讯笔试题目,http://www.77xue.com

  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.

上一页  [1] [2] [3] [4]  下一页


Tag:笔试题目驾照笔试题目,腾讯笔试题目求职指南 - 求职笔试面试 - 笔试题目
联系我们 | 网站地图 | 范文大全 | 管理知识 | 教学教育 | 作文大全 | 语句好词
Copyright http://www.77xue.com--(七七学习网) All Right Reserved.
1 2 3 4 5 6 7 8 9 10