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

程序设计师-Ja315道题

1.Applet运行于服务器端。

判断题

2.编写Java应用程序文件的扩展名为()。

单选题

A. java~||~class~||~html~||~exe

3.有的类定义时可以不定义构造函数,所以构造函数不是必需的。

判断题

4.下面()事件监听器在Java中有事件适配器。

多选题

A. MouseListener~||~KeyListener~||~ActionListener~||~ItemListener

5.当Frame的大小被改变时,Frame中的按钮的位置也可能被改变,请问此时使用的是什么布局管理器

单选题

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

6.下列代码段允许按钮注册一个action事件的是()。

单选题

A. button.enableActionEvents();~||~button.addActionListener(anActionListener);~||~button.enableEvents(true);~||~button.enableEvents(AWTEvent.ACTION_EVENT_MASK);

7.在Applet的生命周期中,init()方法只能被执行一次。

判断题

8.一个异常处理中finally语句块只能有一个或者可以没有。

判断题

9.所有的例外类皆继承()类。

单选题

A. java.io.Exception~||~java.lang.Throwable~||~java.lang.Exception~||~java.lang.Error

10.纯面向对象的语言有()。

单选题

A. C~||~C++~||~Java~||~Pascal

11.以下声明合法的是()。

单选题

A. defaultStrings;~||~publicfinalstaticintw()~||~abstractdoubled;~||~abstractfinaldoublehyperbolicCosine()

12.给出下面代码段:1)switch(m)2){case、System.out.println("case");3)case1、System.out.println("case1");break;4)case2、5)default、System.out.println("default");6)}下列m的()值将引起"default"的输出。

多选题

A. 0~||~1~||~2~||~3

13.java中定义数组名为abc,下面()可以得到数组元素的个数。

单选题

A. abc.length()~||~abc.length~||~len(abc)~||~ubound(abc)

14.给出下面的类publicclassSample{longlength;publicSample(longl){length=l;}publicstaticvoidmain(Stringarg[]){Samples1,s2,s3;s1=newSample(21L);s2=newSample(21L);s3=s2;longm=21L;}}哪个表达式返回true?

单选题

A. s1==s2;~||~s2==s3;~||~m==s1;~||~s1.equals(m);

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

单选题

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

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

多选题

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

17.下列()语句是关闭数据连接时使用的语句。

单选题

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

18.Amino采用的调度模式和算法有哪几种?

多选题

A. Master-Worker~||~Map-reduce~||~Divideandconquer~||~fork-join

19.给出下面的代码Strings=“hello”;Stringt=“hello“;charc[]={“h”,“e”,“l”,“l”,“o”};下列选项里,哪些返回true?

多选题

A. s.equals(t);~||~t.equals(c);~||~s==t;~||~t.equals(newString(“hello”));

20.System类的所有属性和方法都是静态的。

判断题
注册后查看全部试题

保定市乐凯大街305号

电话: 400-608-5357

邮编: 100043


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

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