ImageVerifierCode 换一换
格式:DOCX , 页数:9 ,大小:16.35KB ,
资源ID:121180      下载积分:5 金币
已注册用户请登录:
账号:
密码:
验证码:   换一换
  忘记密码?
三方登录: 微信登录   QQ登录  
下载须知

1: 本站所有资源如无特殊说明,都需要本地电脑安装OFFICE2007和PDF阅读器。
2: 试题试卷类文档,如果标题没有明确说明有答案则都视为没有答案,请知晓。
3: 文件的所有权益归上传用户所有。
4. 未经权益所有人同意不得将文件中的内容挪作商业或盈利用途。
5. 本站仅提供交流平台,并不能对任何下载内容负责。
6. 下载文件中如有侵权或不适当内容,请与我们联系,我们立即纠正。
7. 本站不保证下载资源的准确性、安全性和完整性, 同时也不承担用户因使用这些下载资源对自己和他人造成任何形式的伤害或损失。

版权提示 | 免责声明

本文(电子科技大学22计算机科学与技术面向对象程序设计期末考核试题库带答案参考4.docx)为本站会员(夺命阿水)主动上传,三一文库仅提供信息存储空间,仅对用户上传内容的表现方式做保护处理,对上载内容本身不做任何修改或编辑。 若此文所含内容侵犯了您的版权或隐私,请立即通知三一文库(发送邮件至doc331@126.com或直接QQ联系客服),我们立即给予删除!

电子科技大学22计算机科学与技术面向对象程序设计期末考核试题库带答案参考4.docx

1、书山有路勤为径,学海无涯苦作舟! 住在富人区的她电子科技大学22春“计算机科学与技术”面向对象程序设计期末考核试题库带答案参考一.综合考核(共30题)1.下列常见的系统定义的异常中,()是输入、输出异常。A.UnknownHostExceptionB.IOExceptionC.FileNotFoundExceptionD.ClassNotFoundException参考答案:B2.在一个applet标记中,()标记属性项可以省去不写。A.widthB.heightC.codebaseD.code参考答案:C3.在Java中,用()关键字定义常量。A.fixedB.finalC.#defineD

2、const参考答案:B4.下面是类A的构造函数声明,其中正确的是()。A.void a(int x).B.void A(int x).C.a(int x).D.A(int x).参考答案:D5.下列Java常见事件类中()是鼠标事件类。A.WindowEventB.MouseEventC.KeyEventD.InputEvent参考答案:B6.设有下面两个类的定义:class Personlong id; String name; class Student extends Personint score; int getScore()return score; 则类 Person 和类 S

3、tudent 的关系是()。A.继承关系B.无关系C.包含关系D.关联关系参考答案:A7.Which modifier should be applied to a method for the lock of object this to be obtained prior to execution any of the method body? ()A.synchronizedB.staticC.finalD.abstract参考答案:A8.容器Panel和Applet默认使用的布局管理器是()。A.GridLayoutB.FlowLayoutC.CardLayoutD.BorderLay

4、out参考答案:B9.下列命令中,()命令是Java的编译命令。A.javadocB.javacC.javaD.appletviewer参考答案:B10.对于catch子句的排列,下列()是正确的。A.父类在先,子类在后B.有继承关系的异常不能在同一个try结构程序段内C.排列顺序可任意D.子类在先,父类在后参考答案:D11.下列()修饰符可以使在一个类中定义的成员变量只能被同一包中的类访问。A.无修饰符B.publicC.protectedD.private参考答案:A12.若要抛出异常,应该使用下列()子句。A.tryB.throwC.finallyD.catch参考答案:B13.()类是

5、所有异常类的父类。A.ThrowableB.ExceptionC.ErrorD.AWTError参考答案:B14.Java源文件中最多只能有一个(),其他类的个数不限。A.publicB.interfaceC.finalD.abstract参考答案:A15.以下()约束符可用于定义成员常量。A.staticB.finalC.abstractD.No modifier can be used参考答案:B16.Frame的默认布局管理器是()。A.GridLayoutB.FlowLayoutC.CardLayoutD.BorderLayout参考答案:D17.Java语言没有无符号整数类型、指针类

6、型、结构类型、枚举类型、共用体类型。()A.正确B.错误参考答案:A18.下列代码的执行结果是()。 public class Apublic static void main(Stringargs)System.out.println(5/2);A.2.5B.3C.2D.2.0参考答案:C19.class A public int getNumber(int a)return a+1; class B extends A public int getNumber(int a, char c)return a+2; public static void main(String args) B

7、b=new B(); System.out.println(b.getNumber(0); what is the result?A.compilation succeeds and 3 is printedB.compilation succeeds and 2 is printedC.compilation succeeds and 1 is printedD.An error at this program cause compilation to fail参考答案:C20.在Java语言中,系统常量null,false,true既可以大写,也可以小写。()A.正确B.错误参考答案:B2

8、1.Give incompleted method:/oneif(unsafe()/do something else if(safe()/do the other The method unsafe() will throw an IOException, which completes the method of declaration when added at line one。()A.public void methodName() throws IOExceptionB.public void methodName() throw IOExceptionC.public void

9、methodName()D.public IOException methodName()参考答案:A22.class Apublic String toString()return 4+;class B extends Apublic String toString()return super.toString()+3;public class Testpublic static void main(Stringargs)B b=new B();System.out.println(b.toString(); what is the result。()A.the program throw

10、an exceptionB.nullC.7D.43参考答案:D23.有类定义:abstract class Apublic abstract void f(); 下面关于该类的描述中正确的是()。A.该类的方法不能被重载B.该类可以用new A(); 实例化一个对象C.该类不能被继承D.以上说法都不对参考答案:D24.Java语言中,字符变量以char类型表示,它在内存中占()位bit。A.8B.32C.2D.16参考答案:D25.创建字符串s:String s=new String(abcd); 以下()将改变s。A.以上语句都不会B.s.substring(3);C.s.concat(y)

11、D.s.append(x);参考答案:A26.Java中main()函数的值是()。A.voidB.intC.charD.String参考答案:A27.class Superpublic float getNum()return 3.0f; public class Sub extends Super /overload which method, placed at overload, will cause a compiler error?A.public void getNum(double d)B.public void getNum()C.public float getNum()

12、return 4.0f;D.public double getNum(float d)return 4.0d;参考答案:B28.在j2sdk1.4.2版中,解压得到的目录中,()是存放编译器、解释器和其他许多工具的目录。A.libB.jreC.demoD.bin参考答案:D29.main方法是Java Application程序执行的入口点,下列main方法原型()是不正确的。A.public static void main(stringargs)B.public static void main(Stringargs)C.public static void main(Stringa)D.public static void main(String args)参考答案:A30.抽象方法必须在抽象类中,所以抽象类中的方法都必须是抽象方法。()A.正确B.错误参考答案:B

宁ICP备18001539号-1