首页>题库>程序设计师-Java

程序设计师-Ja315道题

1.Jbuilder9版中默认的布局管理器是()。

单选题

A. GridLayout~||~BorderLayout~||~CardLayout~||~FlowLayout

2.如果关闭一个Applet程序,下面()方法会被调用。

多选题

A. start()~||~paint()~||~stop()~||~destroy()

3.给出下面的代码publicvoidtest(){try{oneMethod();System.out.println("condition1");}catch(ArrayIndexOutOfBoundsExceptione){System.out.println("condition2");}catch(Exceptione){System.out.println("condition3");}finally{System.out.println("finally");}}在oneMethod()方法运行正常的情况下将显示什么?

多选题

A. condition1~||~condition2~||~condition3~||~finally

4.已知如下说明:TextAreata=newTextArea("Hello",5,5),请问()语句是正确的。

多选题

A. Themaximumnumberofcharactersinalineis5.~||~Thedisplayedheightis5linesotherwiseconstrain.~||~Thedisplayedstringcanusemultiplefonts.~||~Thedisplayedstringsareeditable.

5.publiclongskip(longn)方法将指针从当前位置向后跳动n个字节。

判断题

6.当Applet程序所在的浏览器最小化或者是转入其它页面时,该Applet程序调用的()方法。

单选题

A. start()~||~init()~||~stop()~||~destroy()

7.下面()属于Applet的生命周期。

多选题

A. 初始态~||~运行态~||~停止态~||~消亡态

8.运行下列程序,会产生()结果。classOuter1{privateinta;voidfoo(doubled,finalfloatf){Strings;finalbooleanb;classInner{voidmethodInner(){System.out.println("intheInner");}}}publicstaticvoidmain(Stringargs[]){Outer1me=newOuter1();me.foo(123,123);System.out.println("outer");} }

单选题

A. intheInnerouter~||~outer~||~intheInner~||~编译不通过

9.进行Java基本的GUI设计需要用到的包是()。

单选题

A. java.io~||~java.sql~||~java.awt~||~java.rmi

10.Applet调用()方法后,进入初始态。

单选题

A. start()~||~init()~||~stop()~||~destroy()

11.publicstaticvoidmain(Stringargs[]){9Persont=newTeacher();

判断题

12.main()方法的返回类型是什么?

单选题

A. int~||~void~||~boolean~||~static

13.下面哪些代码能通过编译?

多选题

A. inti=0;if(i){System.out.println("");}~||~booleanb=true;booleanb2=true;if(b==b2){System.out.println("Sotrue");}~||~inti=1;intj=2;if(i==1||j==2){System.out.println("OK");}~||~inti=1;intj=2;if(i==1&|j==2){System.out.println("OK");}

14.SQL语句如下:UPDATEchenjiSETname=’andy’,age=28,gender=’M’WHEREID=’16’它完成的功能是()。

单选题

A. 将name=’andy’的记录ID值改为16~||~将age=28的记录ID值改为16~||~将name=’andy’且age=28、gender=’M’的记录的ID值改为16~||~将ID=16的记录name值改为andy、age值改为28、gender值改为M

15.Java程序是由若干类定义组成的,类定义包括定义类头和类体。

判断题

16.关于继承的说法正确的是()。

单选题

A. 子类将继承父类所有的属性和方法~||~子类继承父类的非私有属性和方法~||~子类只继承父类public方法和属性~||~子类只继承父类的方法,而不继承属性

17.JDK提供的用于并发编程的同步器有哪些?

多选题

A. Semaphore~||~CyclicBarrier~||~CountDownLatch~||~Counter

18.下面()方法是Reader类和InputStream类都具有的方法。

多选题

A. read()~||~reset()~||~close()~||~flush()

19.isFile()方法的功能是()。

单选题

A. 如果是文件返回true,否则返回false~||~如果是目录返回true,否则返回false~||~如果文件存在返回true,否则返回false~||~如果目录存在返回true,否则返回false

20.下列()语句是执行SQL语句时使用的语句。

单选题

A. StatementSQL语句变量=连接变量.createStatement()~||~Connection连接变量=DriverManager.getConnection(数据库URL,用户帐号,用户密码)~||~Class.forName(JDBC驱动程序名)~||~连接变量.close()

注册后查看全部试题

保定市乐凯大街305号

电话: 400-608-5357

邮编: 100043


Copyright © 昊元综合学习与考试平台 保定昊元电气科技有限公司版权所有 2021,All Rights Reserved

经营许可证编号:  冀B2-20210069号       备案号:    冀ICP备19021638号