APP下载
首页
>
财会金融
>
Java计算机考试题题库
搜索
Java计算机考试题题库
题目内容
(
单选题
)
24. (单选题)以下关于java类和接口的说法正确的是?

A、  一个类只能实现一个接口

B、  类只能单一继承

C、  类不能同时继承一个类和实现一个接口

D、  接口只允许单一继承

答案:B

Java计算机考试题题库
1.
https://www.shititong.cn/cha-kan/shiti/0005e1b4-86b7-9798-c04c-ee30166b1a02.html
点击查看题目
18. (单选题)执行完代码“int []a=new int[20];”后,( )说法是正确的。
https://www.shititong.cn/cha-kan/shiti/0005e1b3-7b7a-27c0-c04c-ee30166b1a01.html
点击查看题目
9. (单选题)安装好JDK后,在其bin目录下有许多exe可执行文件,其中java.exe命令的作用是以下哪一种?( )
https://www.shititong.cn/cha-kan/shiti/0005e1b3-7b79-e170-c04c-ee30166b1a02.html
点击查看题目
55. (判断题)Java语言的主要贡献者是James Gosling。
https://www.shititong.cn/cha-kan/shiti/0005e1b4-86b7-87f8-c04c-ee30166b1a03.html
点击查看题目
16. (单选题)能从循环语句的循环体中跳出的语句是( )。
https://www.shititong.cn/cha-kan/shiti/0005e1b3-7b7a-23d8-c04c-ee30166b1a01.html
点击查看题目
24. (单选题)
下述4行代码组成的小程序总共创建String对象的个数为: ( )。
String s1 = "abc";
String s2 = new String( );
String s3 = "abc";
String s4 = new String( );
https://www.shititong.cn/cha-kan/shiti/0005e1b4-86b7-ca60-c04c-ee30166b1a00.html
点击查看题目
34. (单选题)
若有定义 int a=2,b=6; 那么boolean c=a>b得到的c的值是什么?
-1
https://www.shititong.cn/cha-kan/shiti/0005e1b4-86b7-60e8-c04c-ee30166b1a01.html
点击查看题目
10. (单选题)
应用程序的main方法中有以下语句,则输出的结果是 ( )。
String s = "xxxxxxxxxxxxxxx#123#456#zzzzz";
int n = s.indexOf("#");
int k = s.indexOf("#", n+1);
String s2 = s.substring(n+1, k);
System.out.println(s2);
https://www.shititong.cn/cha-kan/shiti/0005e1b4-86b7-ab20-c04c-ee30166b1a00.html
点击查看题目
14. (单选题)
关于对象成员占用内存的说法哪个正确?()
https://www.shititong.cn/cha-kan/shiti/0005e1b4-86b7-b2f0-c04c-ee30166b1a01.html
点击查看题目
2 public void printValue( ){…}
https://www.shititong.cn/cha-kan/shiti/0005e1b4-86b7-16b0-c04c-ee30166b1a03.html
点击查看题目
首页
>
财会金融
>
Java计算机考试题题库
题目内容
(
单选题
)
手机预览
Java计算机考试题题库

24. (单选题)以下关于java类和接口的说法正确的是?

A、  一个类只能实现一个接口

B、  类只能单一继承

C、  类不能同时继承一个类和实现一个接口

D、  接口只允许单一继承

答案:B

分享
Java计算机考试题题库
相关题目
1.
https://www.shititong.cn/cha-kan/shiti/0005e1b4-86b7-9798-c04c-ee30166b1a02.html
点击查看答案
18. (单选题)执行完代码“int []a=new int[20];”后,( )说法是正确的。

A.   a[19]值为0

B.   a[19]未定义

C.   a[20]值为0

D.   a[20]为空

https://www.shititong.cn/cha-kan/shiti/0005e1b3-7b7a-27c0-c04c-ee30166b1a01.html
点击查看答案
9. (单选题)安装好JDK后,在其bin目录下有许多exe可执行文件,其中java.exe命令的作用是以下哪一种?( )

A.   Java文档制作工具

B.   Java解释器

C.   Java编译器

D.   Java启动器

https://www.shititong.cn/cha-kan/shiti/0005e1b3-7b79-e170-c04c-ee30166b1a02.html
点击查看答案
55. (判断题)Java语言的主要贡献者是James Gosling。
https://www.shititong.cn/cha-kan/shiti/0005e1b4-86b7-87f8-c04c-ee30166b1a03.html
点击查看答案
16. (单选题)能从循环语句的循环体中跳出的语句是( )。

A.   for语句

B.   break语句

C.   while语句

D.   continue语句

https://www.shititong.cn/cha-kan/shiti/0005e1b3-7b7a-23d8-c04c-ee30166b1a01.html
点击查看答案
24. (单选题)
下述4行代码组成的小程序总共创建String对象的个数为: ( )。
String s1 = "abc";
String s2 = new String( );
String s3 = "abc";
String s4 = new String( );

A.   1

B.   4

C.   2

D.   3

https://www.shititong.cn/cha-kan/shiti/0005e1b4-86b7-ca60-c04c-ee30166b1a00.html
点击查看答案
34. (单选题)
若有定义 int a=2,b=6; 那么boolean c=a>b得到的c的值是什么?
-1

B.  ArrayList

C.  int

D.  main

解析:null
下列哪一个属于Java的基本数据类型。()

https://www.shititong.cn/cha-kan/shiti/0005e1b4-86b7-60e8-c04c-ee30166b1a01.html
点击查看答案
10. (单选题)
应用程序的main方法中有以下语句,则输出的结果是 ( )。
String s = "xxxxxxxxxxxxxxx#123#456#zzzzz";
int n = s.indexOf("#");
int k = s.indexOf("#", n+1);
String s2 = s.substring(n+1, k);
System.out.println(s2);

A.   123456

B.   123

C.  xxxxxxxxxxxxxxx

D.  zzzzz

https://www.shititong.cn/cha-kan/shiti/0005e1b4-86b7-ab20-c04c-ee30166b1a00.html
点击查看答案
14. (单选题)
关于对象成员占用内存的说法哪个正确?()

A.  同一个类的对象共用同一段内存

B.  同一个类的对象使用不同的内存段,但静态成员共享相同的内存空间

C.  对象的方法不占用内存

D.  以上都不对

https://www.shititong.cn/cha-kan/shiti/0005e1b4-86b7-b2f0-c04c-ee30166b1a01.html
点击查看答案
2 public void printValue( ){…}
https://www.shititong.cn/cha-kan/shiti/0005e1b4-86b7-16b0-c04c-ee30166b1a03.html
点击查看答案
试题通小程序
试题通app下载