首页>题库>程序设计师-Java
1.下面()方法是Applet所具有的方法。
多选题A. start()~||~paint()~||~add()~||~destroy()
2.不能被多个进程交叉执行的代码段称为临界区。
判断题3.在使用interface声明一个接口时,只可以使用()修饰符修饰该接口。
单选题A. public~||~protected~||~privateprotected~||~private
4.面向对象的的方法与面向过程的方法最大的不同在于()。
单选题A. 以功能为中心~||~以数据为中心~||~以功能和数据为中心~||~以事件驱动为中心
5.要画一条从点(4,22)到点(2,22)的水平直线,应使用下列()语句。
单选题A. drawLine(40,220,200,220)~||~drawLine(40,220)(200,220)~||~drawLines(40,220,200,220)~||~drawLines(40,220)(200,220)
6.与未加访问控制符的缺省情况相比,public和protected修饰符扩大了类及其属性和方法的被访问范围,private修饰符则缩小了这种范围。
判断题7.下面程序段的运行的结果是()。classExample{publicstaticvoidmain(String[]args){Stringstr1=newString(“abc”);Stringstr2=newString(“abc”);if(str1.equals(str2))System.out.println(“Twostringsareequal.”);elseSystem.out.println(“Twostringsarenotequal.”);if(str1==str2)System.out.println(“str1==str2istrue.”);elseSystem.out.println(“str1==str2isfalse.”);}}
单选题A. Twostringsareequal.str1==str2isfalse.~||~Twostringsarenotequal.str1==str2isfalse.~||~Twostringsareequal.str1==str2istrue.~||~Twostringsarenotequal.str1==str2istrue.
8.接口和抽象类是一回事。
判断题9.子类可以抛出比父类更多的异常。
判断题10.下面有关main()方法声明时,可以改动的是()。
单选题A. public~||~static~||~void~||~args
11.如果关闭一个Applet程序,下面()方法会被调用。
多选题A. start()~||~paint()~||~stop()~||~destroy()
12.下面()对象表示标准输入对象流。
单选题A. System.in~||~System.out~||~System.err~||~System.read
13.下面程序段()行有错误。、abstractclassEmployee{2、intbasic=2;3、abstractvoidsalary();4、}5、classManagerextendsEmployee{6、Employeeemp=newEmployee();7、voidsalary(){8、System.out.println(“工资等于”+basic*5+5678);9、}1、}
单选题A. 3行~||~6行~||~7行~||~8行
14.t.printValue(1);11}12}
单选题A. 第2行的方法~||~第3行的方法~||~第6行的方法~||~第7行的方法
15.要想建立一个学生成绩表student,以下()SQL语句是正确的。
单选题A. createtablestudent~||~createtablestudent(学号char(10),姓名char(8))~||~creategridstudent~||~creategridstudent(学号char(10),姓名char(8))
16.Jbuilder中可使用()组件创建菜单。
单选题A. 4个~||~2个~||~3个~||~1个
17.建立数据源时,数据源名必须和数据库名保持一致。
判断题18.在下列javabean属性中,()属性值的变化可能被其他组件否决掉。
单选题A. Simple~||~Constrained~||~Index~||~Bound
19.下列()属于输出流。
多选题A. 从程序流向打印机的数据流~||~从键盘流向程序的数据流~||~从程序流向显示器的数据流~||~从程序流向磁盘文件的数据流
20.System.out.println("morethan1");4}5elseif((str!=null)&(str.length()<5)){
判断题
Copyright © 昊元综合学习与考试平台 保定昊元电气科技有限公司版权所有 2021,All Rights Reserved
经营许可证编号: 冀B2-20210069号 备案号: 冀ICP备19021638号