网站大量收购闲置独家精品文档,联系QQ:2885784924

08-09-1JAVA试卷B08-09-1JAVA试卷B.doc

  1. 1、本文档共7页,可阅读全部内容。
  2. 2、有哪些信誉好的足球投注网站(book118)网站文档一经付费(服务费),不意味着购买了该文档的版权,仅供个人/单位学习、研究之用,不得用于商业用途,未经授权,严禁复制、发行、汇编、翻译或者网络传播等,侵权必究。
  3. 3、本站所有内容均由合作方或网友上传,本站不对文档的完整性、权威性及其观点立场正确性做任何保证或承诺!文档内容仅供研究参考,付费前请自行鉴别。如您付费,意味着您自己接受本站规则且自行承担风险,本站不退款、不进行额外附加服务;查看《如何避免下载的几个坑》。如果您已付费下载过本站文档,您可以点击 这里二次下载
  4. 4、如文档侵犯商业秘密、侵犯著作权、侵犯人身权等,请点击“版权申诉”(推荐),也可以打举报电话:400-050-0827(电话支持时间:9:00-18:30)。
查看更多
08-09-1JAVA试卷B08-09-1JAVA试卷B

选择题 (单选 每空2分,共20分) 卷B 1、 C 2、 C 3、 C 4、 B 5、 d 6、 A 7、 A 8、 B 9、 D 10、 C 填空简答题(共30分,每空2分) 在画线处填充完整(14分) ①public interface ②implements StudentScore ③public Student ④String nl,float a,float b,float c ⑤return math+English+computer ⑥Student Student1=new Student(“考生姓名”,90,78,85); ⑦total(); (16分) ①byte ②new FileInputStream( args[ 0 ] ) ③new FileOutputStream( args[ 1 ] ) ④ rf.read( buffer, 0, 512) ⑤wf.write( buffer, 0, k); ⑥args[1]; ⑦Thread t=new Thread(cf); ⑧t.start(); 程序分析题(共20分) 运行结果(10分) 1 week:*** 2 week:****** 3 week:** 4 week:******* 2、运行结果(10分) * | 1 2 3 4 5 6 -------|------------------------ 1 | 1 2 | 2 4 3 | 3 6 9 4 | 4 8 12 16 5 | 5 10 15 20 25 6 | 6 12 18 24 30 36 程序设计题(共30分,每题15分) (15分) 类—3分 成员—3分 构造函数—2分 save—2分 fetch-2分 main—3分 java小程序类ValidateApplet.java(15分) public class Validate extends Frame implements ActionListener { String passwd; TextField t; Button b; public Validate() { String passwd = 123456; t = new TextField(20); add(t); b = new Button(校验); b.addActionListener(this); add(b); } public void actionPerformed(ActionEvent e) { if (t.getText().equals(passwd)) t.setText(ok); else t.setText(wrong); } Public static void main(String args[]){ Validate v=new Validate(); v.setVisible(true); } } 1选择题 (单选 每空2分,共20分) 卷B 在Java Applet程序用户自定义的Applet子类中,以下哪个方法在其生命周期中仅执行一次【 】 A)start() B)stop() C)init() D)paint() 下面代码错误的是【 】 int C[][] = new int[3][]; int C[][] = new int[4][3]; int C[][] = new int[][5]; int C[][]={{1,2},{3,4,5},{6}}; 有如下代码: Class a extends Thread{ Public void run{ For(int i=1;i100;i++){System.out.println(i);} }} 能正确启动a中run方法的是【 】 a.run(); a a1=new a(); a1.run() a a1=new a(); a1.start(); a a1=new a(); Thre

文档评论(0)

cduutang + 关注
实名认证
内容提供者

该用户很懒,什么也没介绍

1亿VIP精品文档

相关文档