JAVA期末考试试卷

上传人:公**** 文档编号:544342925 上传时间:2023-05-03 格式:DOCX 页数:9 大小:27.84KB
返回 下载 相关 举报
JAVA期末考试试卷_第1页
第1页 / 共9页
JAVA期末考试试卷_第2页
第2页 / 共9页
JAVA期末考试试卷_第3页
第3页 / 共9页
JAVA期末考试试卷_第4页
第4页 / 共9页
JAVA期末考试试卷_第5页
第5页 / 共9页
点击查看更多>>
资源描述

《JAVA期末考试试卷》由会员分享,可在线阅读,更多相关《JAVA期末考试试卷(9页珍藏版)》请在金锄头文库上搜索。

1、JAVA期末考试试卷,Systemoutprint(exstr+ and ); 天津城市建设院学 2007,2008年第二期学学,Sytemoutprint(exch); java 设言程序设设A 设设 A 卷 设程 , 号 073101-0 public void change(String str,char ch)班str=test ok; 设号一二三四五六七八九设分ch0=g; 得分、 、 、 B good and abc Bgood and gbc Ctest ok and abc Dtest okand gbc , 行下列程序运会设生什设设果5, ( )public class X

2、extends Thread implements Runable 设卷设明 , 设卷考设设设 120 分设。 public void run() 号学 ,,Systemoutprintln(this isrun()”); 密 得分一、空;填本设共空每空分共分,15230 ,如果一个源程序文件中定设有个设使用公司的设设器设设设源程序文1java4sunJDKjavac public static void main(String args)件设生将个与文件名设名相同设展名设的字设设文件。 4.Class , 中所有设都是设 的子设。2Java_Object_Thread t=new Threa

3、d(newX();,设出在填,包中下列基本据设型相设设的封设,与数装,“ 3javalangfloatjavalangFloat,tstart();一,o char_ javaLang.char booleanjavaLang.boolean, 被设设字修设的方法是不能被前设的子设重新定设的方法当4 final封 ,设程的四设设是状新建、运行、中 、断死亡。5 、 第一行设生设设设设会、 第六行设生设设设设会 A B名 姓 java.lang.Objet , 设言中是所有设的根。 6java、 第六行设生行设设会运、 程序行和设会运启 CD, 的事件设理机制包括事件的设者听、事件和事件设理者。

4、 7Swing,要文件从, 文件中设出第个字设到设量中下列方法适合哪个6 filedat10C,? ( ), 是的设。写 8URLUniform Resourse Locator 、 ,AFileInputStreamin=new FileInputStream(filedat); inskip(9); int c=inread(); ,有设设用程序两和。 9javajava Applicationjavaapplet 、 ,BFileInputStream in=new FileInputStream(filedat);inskip(10); int c=inread(); , 设设字符以设

5、设。10_、 ,CFileInputStream in=new FileInputStream(filedat); int c=inread(); 得分二、设设;本设共小设每设分共分,20240、,,,D RandomAccessFile in=new RandomAccessFile(filedat); inskip(9); intc=inreadByte();,欲造构设的一设例此设设承了个接口下列方法是正的,哪个确1ArrayListList(),容器被重新设置大小后设布局管理器的容器中的设件大小不容器大小的设化而改设, 哪随7()、;, 、;, AArrayList myList=new

6、 Object BList myList=newArrayList 、 、 、 、 ACardLayout BFlowLayout CBorderLayout DGridLayout、;, 、;, CArrayList myList=new ListDList myList=new List, 设出 下面代设 , 8, 方法使用设设型的哪参数2paint()? ( )public class Person、 、 A Graphics BGraphics2D CString DColorstatic int arr= new int10;, 指出正的表式 确达 3( ) public stati

7、c void main(Stringa)、 、 、 、 ,Abyte=128; BBoolean=null; Clong l=0xfffL; Ddouble=09239d;, 指出下列程序行的设果运 4( ) ,Systemoutprintln(arr1); publicclass ExampleString str=new String(good); charch=a,b,c;那设句是正的 , 个确 ( )public static void main(String args儿、 设设设设生设设 将、设设设正行设设生设设确运将ABExample ex=new Example();,excha

8、nge(exstr,exch);A 卷第 1 设共 3 设、设出零、设出空。、第行、第行、第行、第行C DA3B6c7 D 8, 下列那是反斜的正表示,;,个杠确,设和是设的子设914TeacherStudentPerson 、 、 、 、 D Person p;Teacher t; 班 , 下列些设句设于存回收的设明是正的哪内确 ; ,10? Student s;、程序设必设设建一设程设放存个来内 ,A/p, t and s are allnon-null 、 存回收程序设设设放无用存内内B if(t instanceof Person) s = (Student)t; 、存回收程序允设程序

9、设直接设放存内内最后一句设旬的设果是, ; ,C、存回收程序可以在指定的设设设放存设象内内、造一将构个设象、表式是合法的 达DAStudentB。,下列代设行出设哪几会;,、表式是设设的 达、设设设正但行设设设。 确运 11: C D, 设出下面代设段1) public void modify() 152) int I, j, k; 1) public class Test 号学 3) I = 100; 2)int m, n; 密4) while ( I 0 ) 3) public Test() 5) j = I * 2; 4) public Test(int a) m=a; ,6) Syst

10、emoutprintln ( The value of j is + j ); 5) publicstatic void main(String arg) 7) k = k + 1; 6) Test t1,t2;8) I-; 7) int j,k;9) 8) j=0; k=0;10 9) t1=new Test(); 封 、 Aline 4 Bline 6 Cline 7 Dline810) t2=new Test(j,k); 名 姓,是型成设设量设量设保持设常量用设短设句定 设设设量。 ; 个 12MAX_LENGTHintpublic, 10011) ,12) 、 行引起一设设设设设, ;

11、 , 哪将个 Apublic int MAX_LENGTH=100;、 、 、 、 、 Bfinal int MAX_LENGTH=100; Aline 3 Bline 5 Cline 6 Dline 10、 , 设于下列代设, Cfinal public int MAX_LENGTH=100; 16、 , D public final int MAX_LENGTH=1001) class Person , 设出下面代设,, 132) public voidprintValue(int i, int j) /, 1) class Parent 3) publicvoid printValue(

12、int i)/2 private String name; 4) 3 public Parent() 5) public class Teacher extends Person, 4 6) public void printValue() /,5) publicclass Child extends Parent 7) public void printValue(int i) /6 private String department; 8) public static void main(Stringargs)7 public Child() 9) Person t = newTeache

13、r();,8 public String getValue() return name; 10)tprintValue(10);9 public static void main(String arg) 11) 第行设句设用行设句 ,; , 将哪 10 Parent p = new Parent(); 10、 、 、 、 11 Aline 2 Bline 3 Cline 6 D line 7, 设设字可以抛出常 , ; , 哪个异 12 17那些行引起设设, ; , 将A 卷第 2 设共 3 设、 Atransient Bfinally C throw Dstatic Panel p=new

14、Panel();,方法的返回设型是, ; ,18Main()、 、 Aint B void Cboolean Dstatic public Test(),;,布局管理器使容器中各件呈格布局平局占据容器空设。个构网19班 、 、 AFlowLayout BCardLayout C GridLayout DBorderLayoutf.setSize(200,200);, 设于下列代设, 20f.add(p);public class Parent p.add(b1); public int addValue( int a, int b) p.add(b2);int s; f.setVisible(

15、true);s = a+b; b1.addActionListener(newActionListener()return s; Override public void actionPerformed(ActionEvent arg0) 号学 bl.setVisible(false); 密class Child extends Parent );下述些方法可以加入设哪 ; ,Child? b2.addActionListener(newActionListener() 、 ,Aint addValue( int a, int b )/ do somethingOverride、 ,Bpublic void

展开阅读全文
相关资源
相关搜索

当前位置:首页 > 商业/管理/HR > 营销创新

电脑版 |金锄头文库版权所有
经营许可证:蜀ICP备13022795号 | 川公网安备 51140202000112号