杭州天丽科技有限公司面试笔试题.doc
《杭州天丽科技有限公司面试笔试题.doc》由会员分享,可在线阅读,更多相关《杭州天丽科技有限公司面试笔试题.doc(6页珍藏版)》请在三一办公上搜索。
1、选择题 1: 1. Whatwillhappenwhenyouattempttocompileandrunthefollowingcode? 2. 3. classBase 4. 5. 6. 7. inti=99; 8. 9. publicvoidamethod() 10. 11. 12. 13. System.out.println(Base.amethod(); 14. 15. 16. 17. Base() 18. 19. 20. 21. amethod(); 22. 23. 24. 25. 26. 27. publicclassDerivedextendsBase 28. 29. 30.
2、 31. inti=-1; 32. 33. 34. 35. publicstaticvoidmain(Stringargv) 36. 37. 38. 39. Baseb=newDerived(); 40. 41. System.out.println(b.i); 42. 43. b.amethod(); 44. 45. 46. 47. publicvoidamethod() 48. 49. 50. 51. System.out.println(Derived.amethod(); 52. 53. 54. 55. 56. 57. Choices:class Base int i = 99; pu
3、blic void amethod() System.out.println(Base.amethod(); Base() amethod(); public class Derived extends Baseint i = -1; public static void main(String argv) Base b = new Derived(); System.out.println(b.i); b.amethod(); public void amethod() System.out.println(Derived.amethod(); Choices:Error! Referenc
4、e source not found.A.Derived.amethod() -1 Derived.amethod() Error! Reference source not found.B.Derived.amethod() 99 Error! Reference source not found.C.Compile time error Error! Reference source not found.D.Derived.amethod() 2:使用 JDBC 可以做到的是 Error! Reference source not found.A.把二进制代码传送到任何关系数据库中 Err
5、or! Reference source not found.B.把 Java 源代码传送到任何关系数据库中 Error! Reference source not found.C.把表单信息传送到任何关系数据库中 Error! Reference source not found.D.很容易地把 SQL 语句传送到任何关系数据库中 3: 1. Strings=”ExampleString”;Whichoperationisnotlegal?String s=”Example String”;Which operation is not legal?Error! Reference sourc
6、e not found.A.int i=s.length(); Error! Reference source not found.B.s3=”x”; Error! Reference source not found.C.String short_s=s.trim(); Error! Reference source not found.D.String t=”root”+s; 4: 1. publicclassX 2. 3. publicObjectm() 4. 5. Objecto=newFloat(3.14F);/line3 6. 7. Objectoa=newObject1;/lin
7、e4 8. 9. oa0=o;/line5 10. 11. o=null;/line6 12. 13. returnoa0;/line7 14. 15. 16. 17. 18. WhenistheFloatobject,createdinline3,eligibleforgarbagecollection?public class X public Object m() Object o = new Float(3.14F);/line 3 Object oa = new Object1;/line 4 oa0 = o;/line 5 o=null;/line 6 return oa0;/li
8、ne 7 When is the Float object, created in line 3,eligible for garbage collection?Error! Reference source not found.A.just after line 5. Error! Reference source not found.B.just after line 6 Error! Reference source not found.C.just after line 7(that is,as the method returns) Error! Reference source n
9、ot found.D.never in this method 5:Which fragments are not correct in Java source file? Error! Reference source not found.A.package testpackage; public class Test/do something. Error! Reference source not found.B.import java.io.*; package testpackage; public class Test/ do something. Error! Reference
10、 source not found.C.import java.io.*; class Person/ do something. public class Test/ do something. Error! Reference source not found.D.import java.io.*; import java.awt.*; public class Test/ do something. 6:在下述选项时,没有构成死循环的程序是 Error! Reference source not found.A.int i=100 while (1) i=i%100+1; if (i10
11、0) break; Error! Reference source not found.B.for (;); Error! Reference source not found.C.int k=1000; do +k; while(k=10000); Error! Reference source not found.D.int s=36; while (s);-s; 7:Which is the main() method return of a application? Error! Reference source not found.A.String Error! Reference
12、source not found.B.byte Error! Reference source not found.C.char Error! Reference source not found.D.void 8:Use the operator “” and “”. Which statement is true? Error! Reference source not found.A.1010 0000 0000 0000 0000 0000 0000 0000 4 give 0000 1010 0000 0000 0000 0000 0000 0000 Error! Reference
13、 source not found.B.1010 0000 0000 0000 0000 0000 0000 0000 4 give 1111 1010 0000 0000 0000 0000 0000 0000 Error! Reference source not found.C.1010 0000 0000 0000 0000 0000 0000 0000 4 give 0000 0000 0000 0000 0000 0000 0000 0000 Error! Reference source not found.D.1010 0000 0000 0000 0000 0000 0000
- 配套讲稿:
如PPT文件的首页显示word图标,表示该PPT已包含配套word讲稿。双击word图标可打开word文档。
- 特殊限制:
部分文档作品中含有的国旗、国徽等图片,仅作为作品整体效果示例展示,禁止商用。设计者仅对作品中独创性部分享有著作权。
- 关 键 词:
- 杭州 科技有限公司 试笔 试题

链接地址:https://www.31ppt.com/p-2996025.html