APP下载
首页
>
财会金融
>
Java计算机考试题题库
搜索
Java计算机考试题题库
题目内容
(
单选题
)
18. (单选题)执行完代码“int []a=new int[20];”后,( )说法是正确的。

A、  a[19]值为0

B、  a[19]未定义

C、  a[20]值为0

D、  a[20]为空

答案:A

Java计算机考试题题库
2 public class Interesting{
https://www.shititong.cn/cha-kan/shiti/0005e1b3-7b7a-6a28-c04c-ee30166b1a01.html
点击查看题目
64. (判断题)
this可以出现在实例方法和构造方法中。
https://www.shititong.cn/cha-kan/shiti/0005e1b4-86b7-8fc8-c04c-ee30166b1a02.html
点击查看题目
31. (单选题)下列哪个叙述是正确的?
https://www.shititong.cn/cha-kan/shiti/0005e1b4-86b7-5d00-c04c-ee30166b1a00.html
点击查看题目
12. (单选题)为AB类的一个无形式参数无返回值的方法method书写方法头,使得使用类名AB作为前缀就可以调用它,该方法头的形式为( )。
https://www.shititong.cn/cha-kan/shiti/0005e1b3-7b7a-6640-c04c-ee30166b1a00.html
点击查看题目
7. (单选题)设x=1,y=2,z=3,则表达式 y+=z--/++x的值是( )。
https://www.shititong.cn/cha-kan/shiti/0005e1b3-7b7a-1050-c04c-ee30166b1a00.html
点击查看题目
5. (单选题)
有以下程序片段,下列哪个选项不能插入到行1。()
https://www.shititong.cn/cha-kan/shiti/0005e1b4-86b7-9798-c04c-ee30166b1a01.html
点击查看题目
10. (单选题)异常处理程序块中用到的关键字有( )、catch和finally。
https://www.shititong.cn/cha-kan/shiti/0005e1b4-86b7-2a38-c04c-ee30166b1a00.html
点击查看题目
9. (单选题)
应用程序的main方法中有以下语句,则输出的结果是 ( )。
String s1="0.5", s2="12";
double x=Double.parseDouble(s1);
int y=Integer.parseInt(s2);
System.out.println( );
https://www.shititong.cn/cha-kan/shiti/0005e1b4-86b7-a738-c04c-ee30166b1a00.html
点击查看题目
39. (单选题)
以下代码段执行后的输出结果为( )
int x=-3; int y=-10;
System.out.println( );
https://www.shititong.cn/cha-kan/shiti/0005e1b4-86b7-e9a0-c04c-ee30166b1a01.html
点击查看题目
10. (单选题)Java源程序的扩展名为( )。
https://www.shititong.cn/cha-kan/shiti/0005e1b3-7b79-e558-c04c-ee30166b1a00.html
点击查看题目
首页
>
财会金融
>
Java计算机考试题题库
题目内容
(
单选题
)
手机预览
Java计算机考试题题库

18. (单选题)执行完代码“int []a=new int[20];”后,( )说法是正确的。

A、  a[19]值为0

B、  a[19]未定义

C、  a[20]值为0

D、  a[20]为空

答案:A

分享
Java计算机考试题题库
相关题目
2 public class Interesting{
https://www.shititong.cn/cha-kan/shiti/0005e1b3-7b7a-6a28-c04c-ee30166b1a01.html
点击查看答案
64. (判断题)
this可以出现在实例方法和构造方法中。
https://www.shititong.cn/cha-kan/shiti/0005e1b4-86b7-8fc8-c04c-ee30166b1a02.html
点击查看答案
31. (单选题)下列哪个叙述是正确的?

A.   源文件可以有2条包语句(package)。

B.   源文件不可以有多条import语句。

C.   如果源文件有package语句,该语句也可以是源文件的第2条语句。

D.   类中的类方法(static方法)只能操作类变量(static变量),不可以操作实例变量。

https://www.shititong.cn/cha-kan/shiti/0005e1b4-86b7-5d00-c04c-ee30166b1a00.html
点击查看答案
12. (单选题)为AB类的一个无形式参数无返回值的方法method书写方法头,使得使用类名AB作为前缀就可以调用它,该方法头的形式为( )。

A.   static void method( )

B.   public void method( )

C.   final void method( )

D.   abstract void method( )

https://www.shititong.cn/cha-kan/shiti/0005e1b3-7b7a-6640-c04c-ee30166b1a00.html
点击查看答案
7. (单选题)设x=1,y=2,z=3,则表达式 y+=z--/++x的值是( )。

A.   3

B.   3. 5

C.   4

D.   5

https://www.shititong.cn/cha-kan/shiti/0005e1b3-7b7a-1050-c04c-ee30166b1a00.html
点击查看答案
5. (单选题)
有以下程序片段,下列哪个选项不能插入到行1。()
https://www.shititong.cn/cha-kan/shiti/0005e1b4-86b7-9798-c04c-ee30166b1a01.html
点击查看答案
10. (单选题)异常处理程序块中用到的关键字有( )、catch和finally。

A.   this

B.   throw

C.   throws

D.   try

https://www.shititong.cn/cha-kan/shiti/0005e1b4-86b7-2a38-c04c-ee30166b1a00.html
点击查看答案
9. (单选题)
应用程序的main方法中有以下语句,则输出的结果是 ( )。
String s1="0.5", s2="12";
double x=Double.parseDouble(s1);
int y=Integer.parseInt(s2);
System.out.println( );

A.   12.5

B.   120.5

C.   12

D.   “12.5”

https://www.shititong.cn/cha-kan/shiti/0005e1b4-86b7-a738-c04c-ee30166b1a00.html
点击查看答案
39. (单选题)
以下代码段执行后的输出结果为( )
int x=-3; int y=-10;
System.out.println( );

A.   -1

B.   2

C.   1

D.   3

https://www.shititong.cn/cha-kan/shiti/0005e1b4-86b7-e9a0-c04c-ee30166b1a01.html
点击查看答案
10. (单选题)Java源程序的扩展名为( )。

A.   .class

B.   .java

C.   .jsp

D.   .jar

https://www.shititong.cn/cha-kan/shiti/0005e1b3-7b79-e558-c04c-ee30166b1a00.html
点击查看答案
试题通小程序
试题通app下载