电科21春《JAVA程序设计》课程在线作业2题目[正确正确答案]单选题答案
20春《JAVA程序设计》在线作业2
试卷总分:100 得分:100
一、单选题 (共 20 道试题,共 80 分)
1.若在某一个类定义中定义有方法:abstract void f();则该类是
A.public类
B.final类
C.抽象类
D.不能确定
2.A class design requires that a member variable should be accessible only by same package, which modifer word should be used?
A.protected
B.public
正确选项:--------
C.no modifer
D.private
3.在Java语言中, 包是自动导入的。
A.java.lang
B.java.awt
C.java.applet
D.java.io
正确选项:--------
4.Java语言中, 是所有类的根类。
A.Object
B.Root
C.Thread
D.Applet
正确选项:--------
5.关键字super的作用是
A.用来访问父类被隐藏的成员变量
B.用来调用父类中被重载的方法
C.用来调用父类的构造方法
D.以上都是
正确选项:--------
6.构造方法在 时候被调用。
A.类定义时
B.创建对象时
C.调用对象方法时
D.使用对象的变量时
7.下列叙述中不正确的是
A.abstract不能与final并列修饰同一个类
B.abstract类中不可以有private的成员
C.abstract方法必须在abstract类中
D.static方法中能直接处理非static的属性
8.Java源文件中最多只能有一个 类,其他类的个数不限。
A.abstract
B.public
C.final
D.interface
正确选项:--------
9.实现下列 接口可以对TextField对象的事件进行监听和处理。
A.ActionListener
B.FocusListener
C.MouseMotionListener
D.WindowListener
10.以下 方法用于定义线程的执行体(线程体)。
A.start()
B.init()
C.run()
D.synchronized()
正确选项:--------
11.Java Application源程序文件的扩展名为
A..java
B..class
C..html
D..exe
正确选项:--------
12.Java语言是在 语言基础上衍生的。
A.pascal
B.C
C.C++
D.VF
正确选项:--------
13.下面 函数是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){...}
14.监听器接口的方法返回值是
A.int
B.String
C.void
D.Object
15.Thread类的方法中,toString()方法的作用是
正确选项:--------
A.只返回线程的名称
B.返回当前线程所属的线程组的名称
C.返回当前线程对象
D.返回线程的字符串信息
16.下面是类A的构造函数声明,其中正确的是
A.void A(int x){...}
B.A(int x){...}
C.a(int x){...}
D.void a(int x){...}
正确选项:--------
17.Which modifier should be applied to a method for the lock of object "this" to be obtained prior to excution any of the method body?
A.synchronized
B.abstract
C.final
D.static
正确选项:--------
18.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
正确选项:--------
19.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
20.如下 方法可以将MenuBar加入Frame中。
A.setMenu()
B.setMenuBar()
C.add()
D.addMenuBar()
正确选项:--------
电科21春《JAVA程序设计》课程在线作业2题目[正确正确答案]多选题答案
二、判断题 (共 5 道试题,共 20 分)
21.( )字符串分为两大类,一类是字符串常量,使用StringBuffer类的对象表示;另一类是字符串变量,使用String类的对象表示。
22.( )子类要调用父类的方法,必须使用super关键字。
23.( )如果p是父类Parent的对象,而c是子类Child的对象,则语句c = p是正确的。
24.( )用“+”可以实现字符串的拼接,用“-”可以从一个字符串中去除一个字符子串。
25.( )A subclass inherits all methods ( including the constructor ) from the superclass.
电科21春《JAVA程序设计》课程在线作业2题目[正确正确答案]奥鹏资讯分享:
山东计算机专升本入学考试大学语文或高等数学、大学英语、思想政治等科目。经院校录取入学后,主要学习、考试专业课程有主要学离散数学、操作系统、微型机原理与应用、数据库系统、编译原理、计算机系统结构、计算机网络、Java程序设计、软件工程等科目。
对于山东具有计算机专科毕业文凭的社会职场人士来说,参加普通专升本已经达不到报考要求(为专科应届大三毕业学生),但是可以通过成人高等教育专升本方式进行报考,成人高等教育属于国民教育系列,是国家承认的、学信网注册可查的。
通过成人高等教育专升本,比如远程教育专升本可选择报考开设招生计算机类专业的院校有北京语言大学、南开大学、大连理工大学、东北师范大学、东北大学、福建师范大学、吉林大学、西南大学、西安交通大学、四川农业大学、四川大学、东北财经大学、北京外国语大学、东北农业大学、兰州大学、北京师范大学、对外经济贸易大学、北京交通大学、电子科技大学、江南大学、北京邮电大学、天津大学、西北工业大学、中国石油大学(华东)、中国地质大学(北京)、中国石油大学(北京)等。