Java程序编译与运行特性及数据库系统核心概念测试.pdfVIP

  • 0
  • 0
  • 约1.34万字
  • 约 6页
  • 2026-02-11 发布于北京
  • 举报

Java程序编译与运行特性及数据库系统核心概念测试.pdf

大庆JSD1310第二次月考试题

一、单项选择题(每题2分,共40分)

1、下列语句哪一个正确()

A.Java程序经编译后会产生机器代码B.Java程序经编译后会产生字节码C.Java程序经编译后会产

生DLLD.以上都不正确

2、下列正确的有()

A.类中的构造函数不可省略B.构造函数必须与类同

名,但方法不能与类同名C.构造函数在一个对象被new时

执行D.一个类只能定义一个构造函数

3、下面程序的运行结果是

符s0w字符串(kvill);字符串s2kv+new字

字串kvill;字符串s1ne

符串(ill);//s2kv+illSystem.out.println(s0s1);

);ystem.out.println(s1s2);A.正确

System.out.println(s0s2S

falsefalse

,true,,false,falseC.false,true,错D.错误,,

trueB.true误

4、执行如下程序代码

a=0;c0;do{‑‑c;aa‑1;}

while(a0);后,C的值是()

A.0B.1C.-1D.死循环

5、下列语句正确的是()

A.形式参数可被视为局部变量B.形式参数可被

字段修饰符修饰C.形式参数为方法被调用时,真正

被传递的参数D.形式参数不可以是对象

6、数据库系统的是()

A、数据库B、数据库管理系统C、数据模型D、软件工具

7、以下代码输出结果为()

publicclassTest{publicstaticStringoutput;

publicstaticvoidfoo(inti){try{if(i1){thrownew

Exception();}output+1;}catch(Exceptione){

output+2;return;}finally{output+3;}output+

4;}publicstaticvoidmain(Stringargs[]){foo(0);

foo(1);System.out.println(output);}}A1342

D13423

B123C134234

8、在Oracle中,下面用于限制分组函数的返回值的字句是()

A、whereB、拥有C、排序D无法限定分组函数的返回

9、下列代码的输出结果是()

classParent{voidprintMe(){

System.out.println(parent);}}

classChildextendsParent{

voidprintMe(){

System.out.println(child);}

voidprintall(){

super.printMe();

this.printMe();printMe();}}

大庆JSD1310第二次月考试题

一、单项选择题(每题2分,共40分)

1、下列语句哪一个正确()

A.Java程序经编译后会产生machinecodeB.Java程序经编译后会产生bytecode

C.Java程序经编译后会产生DLLD.以上都不正确

文档评论(0)

1亿VIP精品文档

相关文档