快捷导航
帮助中心知识拓展客服QQ 515224986
扫码加微信
19春《JAVA程序设计》在线作业1
1.[单选题]下列语句的输出结果是         。public class A{public static void main(String[]args){System.out.println(2>1);}}
奥鹏19春在线答案
奥鹏电子科技大学
    A.true
    B.false
    C.1
    D.0
    正确答案:——A——
2.[单选题]构造方法在         时候被调用。
    A.类定义时
    B.创建对象时
    C.调用对象方法时
    D.使用对象的变量时
    正确答案:——B——
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{}
    正确答案:——B——
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
    正确答案:————
21.[判断题](   )A class can implement as many interfaces as needed.
    A.错误
    B.正确
    正确答案:————
22.[判断题](   )如果p是父类Parent的对象,而c是子类Child的对象,则语句c = p是正确的。
    A.错误
    B.正确
    正确答案:————
23.[判断题](   )字符串分为两大类,一类是字符串常量,使用StringBuffer类的对象表示;另一类是字符串变量,使用String类的对象表示。
    A.错误
    B.正确
    正确答案:————
24.[判断题](   )抽象方法必须在抽象类中,所以抽象类中的方法都必须是抽象方法。
    A.错误
    B.正确
    正确答案:————
25.[判断题](   )A subclass inherits all methods ( including the constructor ) from the superclass.
    A.错误
    B.正确
    正确答案:————
奥鹏作业答案
奥鹏电子科技大学

共 0 个关于本帖的回复 最后回复于 2019-4-23 22:02

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

本版积分规则

精彩推荐

    明星用户

    QQ|Archiver|手机版|小黑屋|www.openhelp100.com ( 冀ICP备19026749号-1 )

    GMT+8, 2024-5-1 21:45