ImageVerifierCode 换一换
格式:DOC , 页数:8 ,大小:69.50KB ,
资源ID:11029762      下载积分:10 金币
快捷下载
登录下载
邮箱/手机:
温馨提示:
快捷下载时,用户名和密码都是您填写的邮箱或者手机号,方便查询和重复下载(系统自动生成)。 如填写123,账号就是123,密码也是123。
特别说明:
请自助下载,系统不会自动发送文件的哦; 如果您已付费,想二次下载,请登录后访问:我的下载记录
支付方式: 支付宝    微信支付   
验证码:   换一换

加入VIP,免费下载
 

温馨提示:由于个人手机设置不同,如果发现不能下载,请复制以下地址【https://www.docduoduo.com/d-11029762.html】到电脑端继续下载(重复下载不扣费)。

已注册用户请登录:
账号:
密码:
验证码:   换一换
  忘记密码?
三方登录: 微信登录   QQ登录   微博登录 

下载须知

1: 本站所有资源如无特殊说明,都需要本地电脑安装OFFICE2007和PDF阅读器。
2: 试题试卷类文档,如果标题没有明确说明有答案则都视为没有答案,请知晓。
3: 文件的所有权益归上传用户所有。
4. 未经权益所有人同意不得将文件中的内容挪作商业或盈利用途。
5. 本站仅提供交流平台,并不能对任何下载内容负责。
6. 下载文件中如有侵权或不适当内容,请与我们联系,我们立即纠正。
7. 本站不保证下载资源的准确性、安全性和完整性, 同时也不承担用户因使用这些下载资源对自己和他人造成任何形式的伤害或损失。

版权提示 | 免责声明

本文(Java东华理工大学试卷C.doc)为本站会员(精品资料)主动上传,道客多多仅提供信息存储空间,仅对用户上传内容的表现方式做保护处理,对上载内容本身不做任何修改或编辑。 若此文所含内容侵犯了您的版权或隐私,请立即通知道客多多(发送邮件至docduoduo@163.com或直接QQ联系客服),我们立即给予删除!

Java东华理工大学试卷C.doc

1、温馨提示:端正考风、严肃考纪、诚信参加考试 凡是代考、使用通讯设备作弊、二次作弊,一经发现开除学籍。专用考试纸 请勿浪费 卷 第 1 页 共 8 页专业 班级 学号 姓名 东 华 理 工 大 学 2012 2013 学 年 第 1 学 期 考 试 试 卷JAVA 程序设计 课程 闭卷 课程类别:考查 补考题号 一 二 三 四 五 六 七 八 九 总分分数评卷人1 选择题(共 35 分)1.Choose the invalid identifiers from those listed below. ( ) A. IDoLikeTheLongNameClass B. $byte C. true

2、D. _ok 2. How can you force garbage collection of an object? ( )A. Garbage collection cannot be forced B. Call System.gc(). C. Call System.gc(), passing in a reference to the object to be garbage collected. D. Call Runtime.gc(). E. Set all references to the object to new values(null, for example). 3

3、 Consider the following class: 1. class Test(int i) 2. void test(int i) 3. System.out.println(“I am an int.”); 4. 5. void test(String s) 6. System.out.println(“I am a string.”); 7. 8. 9. public static void main(String args) 10. Test t=new Test(); 11. char ch=“y”; 12. t.test(ch); 13. 14. Which of the

4、 statements below is true?( .) A. Line 5 will not compile, because void methods cannot be overridden. B. Line 12 will not compile, because there is no version of test() that rakes a char argument. C. The code will compile but will throw an exception at line 12. D. The code will compile and produce t

5、he following output: I am 温馨提示:端正考风、严肃考纪、诚信参加考试 凡是代考、使用通讯设备作弊、二次作弊,一经发现开除学籍。专用考试纸 请勿浪费 卷 第 2 页 共 8 页专业 班级 学号 姓名 an int. 4. Which of the following lines of code will compile without error? ( )A. int i=0; if (i) System.out.println(“Hi”); B. boolean b=0; boolean b2=true; if(b=b2) System.out.println(“So

6、 true”); C. int i=1; int j=2; if(i=1| j=2) System.out.println(“OK”); D. int i=1; int j=2; if (i=1 5. Which two demonstrate a “has a“ relationship? ( ) A. public interface Person public class Employee extends Person B. public interface Shape public interface Rectandle extends Shape C. public interfac

7、e Colorable public class Shape implements Colorable D. public class Species public class Animalprivate Species species; 6 True or False: Readers have methods that can read and return floats and doubles. ( )A. Ture B. False C no answer7 What is result ( )温馨提示:端正考风、严肃考纪、诚信参加考试 凡是代考、使用通讯设备作弊、二次作弊,一经发现开

8、除学籍。专用考试纸 请勿浪费 卷 第 3 页 共 8 页专业 班级 学号 姓名 class Test public static void main(String args) int a=2;System.out.println(a+);A 2 B 3 C 1 D 48 What is result ( )class Testpublic static void main(String args) int a=2,b=3;System.out.println(a+b+);A 2 B 3 C 5 D 49 which platform is not belonging to Java devel

9、oping platform ( )A j2ee B j2me C j2se D jsp10 what expression is incorrect( )A .class file is byte codeB .class file is based on JVMC .class file is run by real CPUD .class file is produced by javac11 what statement is valid ( )A extend is used as implementing hierarchy between both classesB extend

10、s is used as implementing hierarchy between both interfaceC implement is used between interface and classD implements is used as implementing hierarchy between both interface12 Which statement is invalid ( )A int a5; B int a =1,2,4 C int a=new int313 Which sentence is right( )A abstract final class

11、AB abstract private class AC abstract protected class AD abstract class A14 How to compile a Java source code ( )A javac a.java B java a.java C javac a D javac a.class15 Set x=1,y=2,z=3, expression y-=z-%+x; what is result ( )A 1 B 3.5 C 4 D 5二 翻译题 20 分,每小题 5 分温馨提示:端正考风、严肃考纪、诚信参加考试 凡是代考、使用通讯设备作弊、二次作

12、弊,一经发现开除学籍。专用考试纸 请勿浪费 卷 第 4 页 共 8 页专业 班级 学号 姓名 1)Inheritance is a relatively simple concept, which allows one class to extend another, or to inherit characteristics. When a class is extended a hierarchy is built up with the original class at the top and the classes, which build on the class above it

13、 (the class at the top is known as the super-class below). When a class is extended, to create a sub-class, all of the properties (variables and methods) of the original class still exist within the new class along with others, which have been added.2)Polymorphism is the ability of objects to react

14、differently when presented with different information, known as parameters. In a functional programming language the only way to complete two different tasks is to have two functions with different names. Object-oriented languages, which include Java, allow different methods to be run depending on w

15、hat type of parameters is specified. 3)A Java application resembles programs in most compiled languages. Code in object format resides on the users machine and is executed by a run-time interpreter that normally has to be user installed.温馨提示:端正考风、严肃考纪、诚信参加考试 凡是代考、使用通讯设备作弊、二次作弊,一经发现开除学籍。专用考试纸 请勿浪费 卷

16、第 5 页 共 8 页专业 班级 学号 姓名 4)Keywords cannot be used for anything but their predefined purpose. There are 49 in all, These words each have a special meaning to the Java compiler. A keyword must be separated from other keywords or identifiers by white space, a comment or some other punctation symbol.三 程序

17、阅读题(每题 4 分,共计 20 分):The result of following program is:_public class Class1 public static void main(String args)int n=6,sum=0;for(int k=1;k=0;i-)System.out.print(“ a“+i+“ = “+ai+“ “);温馨提示:端正考风、严肃考纪、诚信参加考试 凡是代考、使用通讯设备作弊、二次作弊,一经发现开除学籍。专用考试纸 请勿浪费 卷 第 8 页 共 8 页专业 班级 学号 姓名 System.out.println(“ n 程序运行结束!“);四、编程题 25 分Write an application program that can print numbers from 1 to 10 and then from 10 to 1.(10 分) Write a program that calculates the sum of 1+3+5+999, and display the sum.(15 分)

本站链接:文库   一言   我酷   合作


客服QQ:2549714901微博号:道客多多官方知乎号:道客多多

经营许可证编号: 粤ICP备2021046453号世界地图

道客多多©版权所有2020-2025营业执照举报