2022年java工程师面试题 .pdf
![资源得分’ title=](/images/score_1.gif)
![资源得分’ title=](/images/score_1.gif)
![资源得分’ title=](/images/score_1.gif)
![资源得分’ title=](/images/score_1.gif)
![资源得分’ title=](/images/score_05.gif)
《2022年java工程师面试题 .pdf》由会员分享,可在线阅读,更多相关《2022年java工程师面试题 .pdf(10页珍藏版)》请在淘文阁 - 分享文档赚钱的网站上搜索。
1、西安三元数码软件有限公司外派 JAVA 软件工程师笔试题4303 返回上级目录选择题1:在软件生命周期中,下列哪个说法是不准确的? A.软件生命周期分为计划、开发和运行三个阶段B.在计划阶段要进行问题焉醛和需求分析C.在开发后期要进行编写代码和软件测试D.在运行阶段主要是进行软件维护2:public class Parent int change() class Child extends Parent Which methods can be added into class Child? A.public int change() B.abstract int chang() C.priv
2、ate int change() D.none 3:1. Give the following method: 2. public void method( ) 3. String a,b; 4. a=new String(“hello world ”); 5. b=new String(“game over ”); 6. System.out.println(a+b+”ok”); 7. a=null; 名师资料总结 - - -精品资料欢迎下载 - - - - - - - - - - - - - - - - - - 名师精心整理 - - - - - - - 第 1 页,共 10 页 - - -
3、 - - - - - - 8. a=b; 9. System.out.println(a); 10. 11. In the absence of compiler optimization, which is the earliest point the object a refered is definitely elibile to be garbage collection. A.before line 5 B.before line 6 C.before line 7 D.before line 9 4:1. String s=”ExampleString”;Which operati
4、on is not legal? A.int i=s.length(); B.s3=”x”; C.String short_s=s.trim(); D.String t=”root ”+s; 5:关于垃圾收集的哪些叙述是对的。A.程序开发者必须自己创建一个线程进行内存释放的工作。B.垃圾收集将检查并释放不再使用的内存。C.垃圾收集允许程序开发者明确指定并立即释放该内存。D.垃圾收集能够在期望的时间释放被java 对象使用的内存。6:1. Give the following code: 2. public class Example 3. public static void main(Str
5、ing args ) 4. int l= 0; 5. do 6. System.out.println(“Doing it for l is: ”+l); 7. while(-l 0) 8. System.out.println(“Finish ”); 名师资料总结 - - -精品资料欢迎下载 - - - - - - - - - - - - - - - - - - 名师精心整理 - - - - - - - 第 2 页,共 10 页 - - - - - - - - - 9. 10. 11. Which well be output: A.Doing it for l is 3 B.Doing i
6、t for l is 1 C.Doing it for l is 2 D.Doing it for l is 0 7: Which of the following statements are true? A.The automatic garbage collection of the JVM prevents programs from ever running out of memory B.A program can suggest that garbage collection be performed and force it C.Garbage collection is pl
7、atform independent D.An object becomes eligible for garbage collection when all references denoting it are set to null. 8:下面关于变量及其范围的陈述哪些是错的。A.实例变量是类的成员变量。B.实例变量用关键字static 声明。C.在方法中定义的局部变量在该方法被执行时创建D.局部变量在使用前必须被初始化。9:1. Which is the most appropriate code snippet that can be inserted at line 18 in th
8、e following code? 2. 3. (Assume that the code is compiled and run with assertions enabled) 4. 5. 1. import java.util.*; 6. 7. 2. 8. 9. 3. public class AssertTest 10. 名师资料总结 - - -精品资料欢迎下载 - - - - - - - - - - - - - - - - - - 名师精心整理 - - - - - - - 第 3 页,共 10 页 - - - - - - - - - 11. 4. 12. 13. 5. private
9、 HashMap cctld; 14. 15. 6. 16. 17. 7. public AssertTest() 18. 19. 8. 20. 21. 9. cctld = new HashMap(); 22. 23. 10. cctld.put(in, India); 24. 25. 11. cctld.put(uk, United Kingdom); 26. 27. 12. cctld.put(au, Australia); 28. 29. 13. / more code. 30. 31. 14. 32. 33. 15. / other methods . 34. 35. 16. pub
10、lic String getCountry(String countryCode) 36. 37. 17. 38. 39. 18. / What should be inserted here? 40. 41. 19. String country = (String)cctld.get(countryCode); 42. 43. 20. return country; 44. 45. 21. 46. 47. 22. A.assert countryCode != null; B.assert countryCode != null : Country code can not be null
11、 ; C.assert cctld != null : No country code data is available; 名师资料总结 - - -精品资料欢迎下载 - - - - - - - - - - - - - - - - - - 名师精心整理 - - - - - - - 第 4 页,共 10 页 - - - - - - - - - D.assert cctld : No country code data is available; 10: 在下述选项时 ,没有构成死循环的程序是A.int i=100 while (1) i=i%100+1; if (i100) break; B.f
12、or (;); C.int k=1000; do +k; while(k=10000); D.int s=36; while (s);-s; 11:1. 给出下面的代码片断。下面的哪些陈述为错误的? 2. 1) public void create() 3. 2) Vector myVect; 4. 3) myVect = new Vector(); 5. 4) A.第二行的声明不会为变量myVect分配内存空间。B.第二行语句创建一个Vector 类对象。C.第三行语句创建一个Vector 类对象。D.第三行语句为一个Vector 类对象分配内存空间12:A class design req
- 配套讲稿:
如PPT文件的首页显示word图标,表示该PPT已包含配套word讲稿。双击word图标可打开word文档。
- 特殊限制:
部分文档作品中含有的国旗、国徽等图片,仅作为作品整体效果示例展示,禁止商用。设计者仅对作品中独创性部分享有著作权。
- 关 键 词:
- 2022年java工程师面试题 2022 java 工程师 试题
![提示](https://www.taowenge.com/images/bang_tan.gif)
限制150内