奥鹏作业答案-谋学网-专业的奥鹏在线作业答案辅导网【官网】

 找回密码
 会员注册

微信登录,扫一扫

手机号码,快捷登录

VIP会员,3年作业免费下 !奥鹏作业,奥鹏毕业论文检测新手作业下载教程,充值问题没有找到答案,请在此处留言!
2022年5月最新全国统考资料投诉建议,加盟合作!点击这里给我发消息 点击这里给我发消息
奥鹏课程积分软件(2021年最新)
查看: 667|回复: 0

电子科技大学19春《JAVA程序设计》在线作业2(100分)

[复制链接]
发表于 2019-5-25 11:36:56 | 显示全部楼层 |阅读模式
谋学网
试卷名称:18春《JAVA程序设计》在线作业2-0001
1.下列叙述中不正确的是
A.abstract不能与final并列修饰同一个类
B.abstract类中不可以有private的成员
C.abstract方法必须在abstract类中
D.static方法中能直接处理非static的属性
资料:-

2.在Java中,子类重新定义一个与从父类那里继承来的域变量(成员变量)完全相同的变量,这称为域的
A.隐藏
B.覆盖
C.重载
D.Java不支持此特性
资料:-

3.在Java的基本数据类型中,int型数据占用         字节内存空间。
A.1
B.2
C.4
D.不能确定,取决于计算机字长
资料:-

4.下列常见的系统定义的异常中,         是数组下标越界异常。
A.ArithmeticException
B.IOException
C.ArrayIndexOutOfBoundsException
D.NullPointerException
资料:-

5.在Java语言中,         包是自动导入的。
A.java.lang
B.java.awt
C.java.applet
D.java.io
资料:-

6.在Java中,         语句作为异常处理的统一出口。
A.throw
B.try
C.finally
D.catch
资料:-

7.What happens when you try to compile and run the following program?         
class Mystery{String s;public static void main(String[] args){
Mystery m=new Mystery();m.go();}void Mystery(){s="constructor";}void go(){System.out.println(s);}
}
A.this code will not compile
B.this code compliles but throws an exception at runtime
C.this code runs and "constructor" in the standard output
D.this code runs and writes "null" in the standard output
资料:-

8.Java语言中,         是所有类的根类。
A.Object
B.Root
C.Thread
D.Applet
资料:-

9.Java源文件中最多只能有一个         类,其他类的个数不限。
A.abstract
B.public
C.final
D.interface
资料:-

10.下列         是创建一个标识有“OK”的按钮的语句。
A.TextField b=new TextField("OK");
B.Button b=new Button("OK");
C.TextArea b=new TextArea("OK");
D.Checkbox b=new Checkbox("OK");
资料:-

11.下列         是不合法的标识符。
A._book
B.3file
C.$good
D.a_$2
资料:-

12.下列关于继承的叙述中,         是正确的。
A.子类能继承父类的所有方法和状态
B.子类能继承父类的非私有方法和状态
C.子类只能继承父类的public方法和状态
D.子类只能继承父类的方法,而不继承状态
资料:-

13.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 b=new B();System.out.println(b.getNumber(0));}}
what is the result?
A.compilation succeeds and 1 is printed
B.compilation succeeds and 2 is printed
C.compilation succeeds and 3 is printed
D.An error at this program cause compilation to fail
资料:-

14.下列保留字中书写正确的是
A.Case
B.For
C.try
D.viod
资料:-

15.创建字符串s:String s=new String("abcd");以下         将改变s。
A.s.append("x");
B.s.concat("y");
C.s.substring(3);
D.以上语句都不会
资料:-

16.下列代码的执行结果是         。public class A{public static void main(String[]args){System.out.println(5/2);}}
A.2.5
B.2.0
C.3
D.2
资料:-

17.监听器接口的方法返回值是
A.int
B.String
C.void
D.Object
资料:-

18.一个Java Application运行后,在系统中是作为一个
A.线程
B.进程
C.进程或线程
D.不可预知
资料:-

19.有类定义:abstract class A{public abstract void f();}下面关于该类的描述中正确的是
A.该类可以用new A();实例化一个对象
B.该类不能被继承
C.该类的方法不能被重载
D.以上说法都不对
资料:-

20.下列命令中,         命令是Java的编译命令。
A.javac
B.java
C.javadoc
D.appletviewer
资料:-

1.(   )Java的各种数据类型占用固定长度,与具体的软硬件平台环境无关。
A.错误
B.正确
资料:-

2.(   )Java程序里,创建新的类对象用关键字new,回收无用的类对象使用关键字free。
A.错误
B.正确
资料:-

3.(   )在Java语言中,系统常量null,false,true既可以大写,也可以小写。
A.错误
B.正确
资料:-

4.(   )抽象方法必须在抽象类中,所以抽象类中的方法都必须是抽象方法。
A.错误
B.正确
资料:-

5.(   )子类要调用父类的方法,必须使用super关键字。
A.错误
B.正确
资料:-

本帖子中包含更多资源

您需要 登录 才可以下载或查看,没有账号?会员注册

×
奥鹏作业答案,奥鹏在线作业答案
您需要登录后才可以回帖 登录 | 会员注册

本版积分规则

 
 
客服一
客服二
客服三
客服四
点这里给我发消息
点这里给我发消息
谋学网奥鹏同学群2
微信客服扫一扫

QQ|关于我们|联系方式|网站特点|加入VIP|加盟合作|投诉建议|法律申明|Archiver|小黑屋|奥鹏作业答案-谋学网 ( 湘ICP备2021015247号 )

GMT+8, 2024-5-11 19:51 , Processed in 0.101530 second(s), 19 queries .

Powered by Discuz! X3.5

Copyright © 2001-2023 Tencent Cloud.

快速回复 返回顶部 返回列表