2010计算机等级考试二级(JAVA)笔试60(三)

时间:2011-07-21 06:52:36

微信搜索关注"91考试网"公众号,领30元,获取事业编教师公务员等考试资料40G
2768~+32767

C.-2147483648~+2417483647

D.-3.40282347E38~+3.40282347E38

参考答案: B

----------------------------------------

14、下列的哪个赋值语句是不正确的? ( )

A.float f=11.1;

B.doule d=5.3E12;

C.float d=3.14f;

D.doule f=11.1E10f;

参考答案: A

----------------------------------------

15、 类Test定义如下,将下列哪个方法插入③行处是不合法的? ( ) ①public class Test { ②public float Method(float a,float b).{} ③ ④}

A.ulic float Method(float a,float ,float c){}

B.ulic float Method(float c,float d){}

C.ulic it Method(it a,it ){}

D.rivate float Method(it a,it ,it c){}

参考答案: B

----------------------------------------

16、下列的哪个程序段可能导致错误? ( )

A.Strig =hello;Strig t=good;Strigk=+t

B.Strig =hello;Strig t;t=[3]+oe;

C.Strig =hello;Strig tadard=.toUerCae();

D.Strig =hello;Strig t=+good;

参考答案: B

----------------------------------------

17、下列关于继承的哪项叙述是正确的? ( )

A.在java中允许多重继承

B.在java中一个类只能实现一个接口

C.在java中一个类不能同时继承一个类和实现一个接口

D.java的单-继承使代码更可靠

参考答案: D

----------------------------------------

18、 下列程序段的输出结果是 ( ) String MyStr=Hello,; MyStr=MyStr+World!; System.out.println(MyStr);

A.Hello,World!

B.Hello.

C.World!

D.该程序段有语法错误

参考答案: A

----------------------------------------

19、 下列程序的输出结果是 ( ) Public class fff { void printValue(int m) { do{System.out.println(The value is+m);{ whilE(--m>10) } public static void main(String arg[]){ int i=10; Test t=new Test(); t.printValue(i); } }

A.8

B.9

C.10

D.11

参考答案: C

----------------------------------------

20、 已知有下列类的说明,则下列哪个语句是正确的? ( ) public class Test { private float f=1.0f; int m=2; static int n=1; public static void main(String arg[]) { Test t=new Test(); } }

A.t.f

B.thi,;

C.Tet.m

D.Tet.f

参考答案: A

----------------------------------------

21、下列哪个语句是声明一个含有10个String对象的数组? ( )

A.char tr

首页 上页 2 3 4 下页 尾页 3/5/5
微信搜索关注"91考试网"公众号,领30元,获取公务员事业编教师考试资料40G
【省市县地区导航】【考试题库导航】

电脑版  |  手机版  |  返回顶部