




免费预览已结束,剩余1页可下载查看
下载本文档
版权说明:本文档由用户提供并上传,收益归属内容提供方,若内容存在侵权,请进行举报或认领
文档简介
选择题 1:使用 JDBC 可以做到的是 A.把二进制代码传送到任何关系数据库中 B.把 Java 源代码传送到任何关系数据库中 C.把表单信息传送到任何关系数据库中 D.很容易地把 SQL 语句传送到任何关系数据库中 2: 1. Givethisclassoutline: 2. classExample 3. privateintx; 4. /restofclassbody 5. 6. AssumingthatxinvokedbythecodejavaExample,whichstatementcanmadexbedirectlyaccessibleinmain()methodofExample.java?Give this class outline:class Exampleprivate int x;/rest of class bodyAssuming that x invoked by the code java Example, which statement can made x be directly accessible in main() method of Example.java?A.Change private int x to public int x B.change private int x to static int x C.Change private int x to protected int x D.change private int x to final int x 3:Math.round(-11.5)等於多少? A.-11 B.-12 C.-11.5 D.none 4:Which statement about the garbage collection mechanism are true? A.Garbage collection require additional programe code in cases where multiple threads are running. B.The programmer can indicate that a reference through a local variable is no longer of interest. C.The programmer has a mechanism that explicity and immediately frees the memory used by Java objects. D.The garbage collection mechanism can free the memory used by Java Object at explection time. 5: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.private int change() D.none 6:Which of the following statements are not legal? A.long l = 4990; B.int i = 4L; C.double d = 34.4; D.double t = 0.9F. 7:关于垃圾收集的哪些叙述是对的。 A.程序开发者必须自己创建一个线程进行内存释放的工作。 B.垃圾收集将检查并释放不再使用的内存。 C.垃圾收集允许程序开发者明确指定并立即释放该内存。 D.垃圾收集能够在期望的时间释放被java对象使用的内存。 8:以下的C程序代码片段运行后C和d的值分别是多少 Int a =1,b =2; Int c,d; c =(a&b)&a; d =(a&b)&a; A.0,0 B.0,1 C.1,0 D.1,1 9: 1. Givethefollowingjavasourcefragement: 2. /pointx 3. publicclassInteresting 4. /dosomething 5. 6. WhichstatementiscorrectlyJavasyntaxatpointx?Give the following java source fragement:/point xpublic class Interesting/do somethingWhich statement is correctly Java syntax at point x? A.public class MyClass/do other thing B.static int PI=3.14 C.class MyClass/do something D.none 10:Which of the following answer is correct to express the value 8 in octal number? A.010 B.0x10 C.08 D.0x8 11:Which is the main() method return of a application? A.String B.byte C.char D.void 12: 1. 给出下面的代码片断。下面的哪些陈述为错误的? 2. 1)publicvoidcreate() 3. 2)VectormyVect; 4. 3)myVect=newVector(); 5. 4)给出下面的代码片断。下面的哪些陈述为错误的?1) public void create() 2) Vector myVect;3) myVect = new Vector();4) A.第二行的声明不会为变量myVect分配内存空间。 B.第二行语句创建一个Vector类对象。 C.第三行语句创建一个Vector类对象。 D.第三行语句为一个Vector类对象分配内存空间 13:What is written to the standard output given the following statement:System.out.println(4|7); Select the right answer: A.4 B.5 C.6 D.7 14: 1. Whatresultsfromattemptingtocompileandrunthefollowingcode? 2. 3. publicclassTernary 4. 5. 6. 7. publicstaticvoidmain(Stringargs) 8. 9. 10. 11. inta=5; 12. 13. System.out.println(Valueis-+(a5)?9.9:9); 14. 15. 16. 17. 18. 19. Choices:What results from attempting to compile and run the following code? public class Ternarypublic static void main(String args)int a = 5;System.out.println(Value is - + (a 5) ? 9.9 : 9); Choices:A.prints: Value is - 9 B.Compilation error C. prints: Value is - 5 D.None of these 15: 1. Givethefollowingjavaclass: 2. publicclassExample 3. publicstaticvoidmain(Stringargs) 4. staticintx=newint15; 5. System.out.println(x5); 6. 7. 8. Whichstatementiscorrected?Give the following java class:public class Examplepublic static void main(String args)static int x = new int15;System.out.println(x5);Which statement is corrected?A.When compile, some error will occur. B.When run, some error will occur. C.Output is zero. D.Output is null. 简答题 16:你所知道的集合类都有哪些?主要方法? 17:有一个整数n,写一个函数f(n),返回0到n之间出现的1的个数。比如f(13)=6,现在f(1)=1,问下一个最大的f(n)=n的n是什么? 18:How to use final to class,method and data? 19:有一篇英文文章(也就是说每个单词之间由空格分隔),请找出“csdn”着个单词出现的次数,要求效率最高,并写出算法的时间级。 20:马克思在数学手稿中提出如下问题:有30个人(包括男人、女人和小孩)在一家饭店吃饭共花50先令,其中每个男人花3先令,每个女人花2先令,每个小孩花1先令,问男人、女人、小孩各有多少人? 21:在使用spring开发的J2EE分层结构中,service层一般都有XXXManager接口,请问他的作用是? 22:在一个正整数序列中求和最大的非相邻子序列(序列任两元素在原序列里都不相邻) 23:Hashtable和HashMap的异同。 24:servlet的生命周期? 25:公元4046年,人类科学高度发达,绝大部分人都已经移居至浩瀚的宇宙,在上千颗可居住的星球上留下了人类的印记。然而,此时人类却分裂成了两个联盟:正义联盟和邪恶联盟。两个联盟之间仇恨难解,时有战争。 现在,邪恶联盟通过不正当贸易积聚了大量宇宙财富。因此,正义联盟计划要破坏邪恶联盟的非法贸易网络,从而影响邪恶联盟的经济状况,为下
温馨提示
- 1. 本站所有资源如无特殊说明,都需要本地电脑安装OFFICE2007和PDF阅读器。图纸软件为CAD,CAXA,PROE,UG,SolidWorks等.压缩文件请下载最新的WinRAR软件解压。
- 2. 本站的文档不包含任何第三方提供的附件图纸等,如果需要附件,请联系上传者。文件的所有权益归上传用户所有。
- 3. 本站RAR压缩包中若带图纸,网页内容里面会有图纸预览,若没有图纸预览就没有图纸。
- 4. 未经权益所有人同意不得将文件中的内容挪作商业或盈利用途。
- 5. 人人文库网仅提供信息存储空间,仅对用户上传内容的表现方式做保护处理,对用户上传分享的文档内容本身不做任何修改或编辑,并不能对任何下载内容负责。
- 6. 下载文件中如有侵权或不适当内容,请与我们联系,我们立即纠正。
- 7. 本站不保证下载资源的准确性、安全性和完整性, 同时也不承担用户因使用这些下载资源对自己和他人造成任何形式的伤害或损失。
最新文档
- 2020-2025年中级注册安全工程师之安全生产技术基础自我检测试卷A卷附答案
- 部编版八年级上册语文飞天凌空听评课记录
- 人教版物理九年级20.4《电动机》听评课记录
- 人教部编版语文七年级下册第四单元《写作:如何选材》听评课记录
- (新)人教版七年级语文上册第4课《古代诗歌四首》听评课记录
- 化工过程安全刘景良课件
- 化工设备科普知识培训课件
- 林风眠鉴赏课课件
- Cytidine-5-triphosphate-100mM-Solution-PCR-Grade-Cytidine-triphosphate-100mM-Solution-PCR-Grade-生命科学试剂-MCE
- rac-Acetaminophen-mercapturate-d5-生命科学试剂-MCE
- 2025年秋季开学第一次全体中层班子会议上校长精彩讲话:把小事做细、把细事做实、把实事做好
- 2025-2030中国物流园区自动化技术应用与智慧化改造趋势报告
- 2025年人武专干军事考试题库及答案
- 【G1工业锅炉司炉】理论考试题及答案
- 记账实操-酿酒企业的账务处理
- 2025版个体户灵活用工劳动合同范本
- 2025年小学体育教师招聘教材教法考试试题及答案
- 招标代理机构从业人员考试模拟试题及答案
- 湘教版分式的乘法和除法教案
- 跌水水力计算(水工结构版)
- 七年级英语下册阅读理解练习题30篇
评论
0/150
提交评论