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

 找回密码
 会员注册

微信登录,扫一扫

手机号码,快捷登录

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

电子科大17秋《JAVA程序设计》在线作业3(100分)

[复制链接]
发表于 2017-10-16 12:22:25 | 显示全部楼层 |阅读模式
谋学网
1.  下列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  分
2.  Thread类的方法中,toString()方法的作用是

A. 只返回线程的名称


B. 返回当前线程所属的线程组的名称


C. 返回当前线程对象


D. 返回线程的字符串信息

正确资料:D      满分:4  分
3.  有数组定义:int a[]={0,1,2,3,4,5,6};,则a数组的数组元素个数为

A. a.length()


B. a.length()+1


C. a.length


D. a.length+1

正确资料:C      满分:4  分
4.  下列         修饰符可以使在一个类中定义的成员变量只能被同一包中的类访问。

A. private


B. public


C. protected


D. 无修饰符

正确资料:D      满分:4  分
5.  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

正确资料:D      满分:4  分
6.  设有数组定义:int a[]=new int[8];,则a.length的值为

A. 0


B. 7


C. 8


D. 9

正确资料:C      满分:4  分
7.  下列         是Java的调试器,如果编译器返回程序代码的错误,可以用它对程序进行调试。

A. java.exe


B. javadoc.exe


C. jdb.exe


D. javaprof.exe

正确资料:C      满分:4  分
8.  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

正确资料:A      满分:4  分
9.  设有下面的两个类定义:class A{void show(){System.out.print("AA");}}
class B extends A{void show(){System.out.print("BB");}}
则顺序执行如下语句后输出的结果为         。A a=new A();B b=new B();
a.show();b.show();

A. AAAA


B. AABB


C. BBBB


D. BBAA

正确资料:B      满分:4  分
10.  有如下代码:class A{private int m;public static void f(){}}为了让f()方法能直接访问m,则应

A. 将private int m;改为protected int m;


B. 将private int m;改为public int m;


C. 将private int m;改为static int m;


D. 将private int m;改为int m;

正确资料:C      满分:4  分

本帖子中包含更多资源

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

×
奥鹏作业答案,奥鹏在线作业答案
发表于 2017-10-16 12:32:27 | 显示全部楼层
奥鹏作业答案,奥鹏在线作业答案
回复

使用道具 举报

发表于 2017-11-1 11:46:48 | 显示全部楼层
奥鹏作业答案,奥鹏在线作业答案
回复

使用道具 举报

发表于 2017-11-3 10:45:54 | 显示全部楼层
奥鹏作业答案,奥鹏在线作业答案
回复

使用道具 举报

发表于 2017-11-7 21:50:25 | 显示全部楼层
奥鹏作业答案,奥鹏在线作业答案
回复

使用道具 举报

您需要登录后才可以回帖 登录 | 会员注册

本版积分规则

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

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

GMT+8, 2024-3-29 06:53 , Processed in 0.096782 second(s), 19 queries .

Powered by Discuz! X3.5

Copyright © 2001-2023 Tencent Cloud.

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