欢迎光临
我们一直在努力

电科19秋《JAVA程序设计》在线作业【满分答案】

可做奥鹏国开全部院校作业论文!答案请添加qq:599792888 或 微信:1095258436

19秋《JAVA程序设计》在线作业1-0001

试卷总分:100    得分:100

一、 单选题 (共 20 道试题,共 80 分)

1.下列语句的输出结果是 。public class A{public static void main(String[]args){System.out.println(2>1);}}

A.true

B.false

C.1

D.0

正确答案:?

 

 

2.构造方法在 时候被调用。

A.类定义时

B.创建对象时

C.调用对象方法时

D.使用对象的变量时

正确答案:?

 

 

3.下列Java源文件代码片段中, 是不正确的。

A.package t;public class A{}

B.import java.io.*;package t;public class A{}

C.import java.io.*;class A{}public class B{}

D.import java.io.*;import java.awt.*;public class A{}

正确答案:?

 

 

4.下列代码的执行结果是 。public class A{public static void main(String[]args){System.out.println(5/2);}}

A.2.5

B.2.0

C.3

D.2

正确答案:?

 

 

5.在Java的基本数据类型中,int型数据占用 字节内存空间。

A.1

B.2

C.4

D.不能确定,取决于计算机字长

正确答案:?

 

 

6.在Java中, 语句作为异常处理的统一出口。

A.throw

B.try

C.finally

D.catch

正确答案:?

 

 

7.下列Java常见事件类中 是鼠标事件类。

A.InputEvent

B.KeyEvent

C.MouseEvent

D.WindowEvent

正确答案:?

 

 

8.下列关于接口的叙述中, 是正确的。

A.接口与抽象类是相同的概念

B.接口之间不能有继承关系

C.一个类只能实现一个接口

D.接口中只含有抽象方法和常量

正确答案:?

 

 

9.以下 可能包含菜单条。

A.Panel

B.Applet

C.Dialog

D.Frame

正确答案:?

 

 

10.下面 函数是public void example(int k){…}的重载函数。

A.public void example( int m){…}

B.public int example(int k){…}

C.public void example2(int k){…}

D.public int example( int m, float f){…}

正确答案:?

 

 

11.如下 字符串是Java中合法的用户自定义标识符。

A.super

B.3number

C.#number

D.$number

正确答案:?

 

 

12.下列叙述错误的是

A.Java是一种面向对象的网络编程语言

B.Java Applet程序在网络上传输不受硬软件平台的限制

C.Java提供了类库支持TCP/IP协议

D.Java语言允许使用指针访问内存

正确答案:?

 

 

13.在Java中,用 关键字定义常量。

A.define

B.fixed

C.const

D.final

正确答案:?

 

 

14.下面是类A的构造函数声明,其中正确的是

A.void A(int x){…}

B.A(int x){…}

C.a(int x){…}

D.void a(int x){…}

正确答案:?

 

 

15.若在某一个类定义中定义有方法:abstract void f();则该类是

A.public类

B.final类

C.抽象类

D.不能确定

正确答案:?

 

 

16.布局管理器使容器中各个构件呈网格布局,平均占据容器空间。

A.CardLayout

B.BorderLayout

C.FlowLayout

D.GridLayout

正确答案:?

 

 

17.public class Test{ public static void main(String[] args){ String a=args[1];String b=args[2];String c=args[3]; } } execute command:java Test Red Green Blue what is the value of c?

A.c has value of null

B.c has value of Blue

C.the code does not compile

D.the program throw an exception

正确答案:?

 

 

18.Give incompleted method: //one {if(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 IOException methodName()

B.public void methodName()

C.public void methodName() throw IOException

D.public void methodName() throws IOException

正确答案:?

 

 

19.Java语言的许多特点中,下列 特点是C++语言所不具备的。

A.高性能

B.跨平台

C.面向对象

D.有类库

正确答案:?

 

 

20.Java Application源程序文件的扩展名为

A..java

B..class

C..html

D..exe

正确答案:?

 

 

二、 判断题 (共 5 道试题,共 20 分)

1.( )A class can implement as many interfaces as needed.

A.错误

B.正确

正确答案:?

 

 

2.( )如果p是父类Parent的对象,而c是子类Child的对象,则语句c = p是正确的。

A.错误

B.正确

正确答案:?

 

 

3.( )字符串分为两大类,一类是字符串常量,使用StringBuffer类的对象表示;另一类是字符串变量,使用String类的对象表示。

A.错误

B.正确

正确答案:?

 

 

4.( )抽象方法必须在抽象类中,所以抽象类中的方法都必须是抽象方法。

A.错误

B.正确

正确答案:?

 

 

5.( )A subclass inherits all methods ( including the constructor ) from the superclass.

A.错误

B.正确

正确答案:?

赞(0)
未经允许不得转载:奥鹏作业网 » 电科19秋《JAVA程序设计》在线作业【满分答案】

评论 抢沙发

  • 昵称 (必填)
  • 邮箱 (必填)
  • 网址