21秋电科大《面向对象程序设计》课程在线作业1-1

[复制链接]
查看: 316|回复: 2

23万

主题

23万

帖子

32万

积分

管理员

Rank: 9Rank: 9Rank: 9

积分
329160
发表于 2021-10-18 09:36:34 | 显示全部楼层 |阅读模式
答案来源:雅宝题库QV同步1144766066网(www.ybaotk.com)面向对象程序设计-[电子科技大学]《面向对象程序设计》课程在线作业1
试卷总分:100    得分:100
第1,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
正确答案:


第2题,以下(    )约束符可用于定义成员常量。
A、static
B、final
C、abstract
D、No modifier can be used
正确答案:


第3题,在Java的基本数据类型中,int型数据占用(   ) 字节内存空间。
A、1
B、2
C、4
D、不能确定,取决于计算机字长
正确答案:


第4题,Java中main()函数的值是         。
A、String
B、int
C、char
D、void
正确答案:


答案来源:雅宝题库QV同步1144766066网(www.ybaotk.com),下列常见的系统定义的异常中,(   )是输入、输出异常。
A、ClassNotFoundException
B、IOException
C、FileNotFoundException
D、UnknownHostException
正确答案:


第6题,import java.awt.*;    public class X extends Frame{      public static void main(String[] args){        X x=new X();x.pack();x.setVisible(true);      }      public X(){        setLayout(new GridLayout(2,2));        Panel p1=new Panel();         add(p1);        Button b1=new Button("One");  p1.add(b1);        Panel p2=new Panel();add(p2);        Button b2=new Button("Two");   p2.add(b2);        Button b3=new Button("Three");  p2.add(b3);        Button b4=new Button("Four");  add(b4);      } }when the frame is resized,
A、all change height and width
B、Button One change height
C、Button Two change height and Button Three change width
D、Button Four change height and width
正确答案:


第7题,下列Java常见事件类中(   )是鼠标事件类。
A、InputEvent
B、KeyEvent
C、MouseEvent
D、WindowEvent
正确答案:


第8题,在使用interface声明一个接口时,只可以使用         修饰符修饰该接口。
A、public
B、protected
C、private和protected
D、private
正确答案:


第9题,在Java中,用(   )关键字定义常量。
A、#define
B、fixed
C、const
D、final
正确答案:


答案来源:雅宝题库QV同步1144766066网(www.ybaotk.com),下列         修饰符可以使在一个类中定义的成员变量只能被同一包中的类访问。
A、private
B、public
C、protected
D、雅修饰符
正确答案:


第11题,public class X extends Frame{public static void main(String[] args){X x=new X();x.pack();x.setVisible(true);}public X(){setLayout(new GridLayout(2,2));Panel p1=new Panel();         add(p1);Button b1
A、all change height and width
B、Button One change height
C、Button Two change height and Button Three change width
D、Button Four change height and width
正确答案:


答案来源:雅宝题库QV同步1144766066网(www.ybaotk.com),下列关于接口的叙述中,(    )是正确的。
A、接口与抽象类是相同的概念
B、接口之间不能有继承关系
C、一个类只能实现一个接口
D、接口中只含有抽象方法和常量
正确答案:


第13题,在Java的基本数据类型中,int型数据占用         字节内存空间。
A、1
B、2
C、4
D、不能确定,取决于计算机字长
正确答案:


第14题,下列语句输出结果为(   )。public class A{public static void main(String[]args){byte b=0xa;System.out.println(b);}}。
A、0xa
B、a
C、1
D、10
正确答案:


答案来源:雅宝题库QV同步1144766066网(www.ybaotk.com),下列 (    )是异常的含义。
A、程序的语法错
B、程序编译或运行中所发生的异常事件
C、程序预先定义好的异常事件
D、程序编译错误
正确答案:


第16题,下列命令中,         命令是Java的编译命令。
A、javac
B、java
C、javadoc
D、appletviewer
正确答案:


第17题,class Super{public float getNum(){return 3.0f;}}
public class Sub extends Super{//overload}
which method, placed at overload, will cause a compiler error?
A、public float getNum(){return 4.0f;}
B、public void getNum(){}
C、public void getNum(double d){}
D、public double getNum(float d){return 4.0d;}
正确答案:


第18题,在一个applet标记中,(   )标记属性项可以省去不写。
A、code
B、codebase
C、width
D、height
正确答案:


第19题,已知如下代码:
public class Test{static long a[] = new long[10];public static void main ( String arg[] ) {
System.out.println ( a[6] );}
}
则下面         个语句是正确的。
A、Output is null.
B、When compile, some error will occur.
C、Output is 0.
D、When running, some error will occur.
正确答案:


答案来源:雅宝题库QV同步1144766066网(www.ybaotk.com),下列叙述错误的是
A、Java是一种面向对象的网络编程语言
B、Java Applet程序在网络上传输不受硬软件平台的限制
C、Java提供了类库支持TCP/IP协议
D、Java语言允许使用指针访问内存
正确答案:


第21题,Java的屏幕坐标是以像素为单位,容器的左下角被确定为坐标的起点。
T、对
F、错
正确答案:F


第22题,抽象方法必须在抽象类中,所以抽象类中的方法都必须是抽象方法。
T、对
F、错
正确答案:F


第23题,J2SDK中主要有两个相关环境变量,即path和classpath。前者指定了JDK命令搜索路径,后者指定了Java类路径。
T、对
F、错
更多答案下载:雅宝题库QV同步1144766066网(www.ybaotk.com)


第24题,Java的各种数据类型占用固定长度,与具体的软硬件平台环境雅关。
T、对
F、错
更多答案下载:雅宝题库QV同步1144766066网(www.ybaotk.com)


答案来源:雅宝题库QV同步1144766066网(www.ybaotk.com),Java语言没有雅符号整数类型、指针类型、结构类型、枚举类型、共用体类型。
T、对
F、错
更多答案下载:雅宝题库QV同步1144766066网(www.ybaotk.com)





上一篇:21秋电科大《软件技术基础》课程在线作业3
下一篇:21秋电科大《面向对象程序设计》课程在线作业1
回复

使用道具 举报

0

主题

3496

帖子

5245

积分

论坛元老

Rank: 8Rank: 8

积分
5245
发表于 2022-3-13 10:24:44 | 显示全部楼层
甘肃电大形考作业可以做吗?
回复

使用道具 举报

0

主题

3401

帖子

5102

积分

论坛元老

Rank: 8Rank: 8

积分
5102
发表于 2022-3-14 13:28:15 | 显示全部楼层
奥鹏作业可以代做吗?
回复

使用道具 举报

您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

精彩课程推荐
|网站地图|网站地图