APP下载
首页
>
财会金融
>
Java计算机考试题题库
搜索
Java计算机考试题题库
题目内容
(
单选题
)
11 }

答案:空

Java计算机考试题题库
4. (填空题)若int []a={12,45,34,46,23}; ,则a[2]= ______。
https://www.shititong.cn/cha-kan/shiti/0005e1b3-7b7a-3760-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
点击查看题目
35. (单选题)
String或StringBuffer类的对象在调用以下哪个方法时其自身会发生更改?( )
https://www.shititong.cn/cha-kan/shiti/0005e1b4-86b7-e5b8-c04c-ee30166b1a00.html
点击查看题目
45. (单选题)下列哪个叙述是正确的?
https://www.shititong.cn/cha-kan/shiti/0005e1b4-86b7-f558-c04c-ee30166b1a01.html
点击查看题目
53. (判断题) Java是一种面向对象的程序设计语言。
https://www.shititong.cn/cha-kan/shiti/0005e1b4-86b7-87f8-c04c-ee30166b1a01.html
点击查看题目
64. (判断题)
this可以出现在实例方法和构造方法中。
https://www.shititong.cn/cha-kan/shiti/0005e1b4-86b7-8fc8-c04c-ee30166b1a02.html
点击查看题目
33. (单选题)
下列程序段运行后,变量temp的值是( )。
int temp = 2 ;
temp++;
temp*=5;
temp/=2;
https://www.shititong.cn/cha-kan/shiti/0005e1b4-86b7-dde8-c04c-ee30166b1a02.html
点击查看题目
14. (单选题)
以下由do...while语句构成的循环的执行次数是( )。
int k=0;
do{
++k;
}while(k<1);
https://www.shititong.cn/cha-kan/shiti/0005e1b3-7b7a-1ff0-c04c-ee30166b1a00.html
点击查看题目
65. (判断题)static方法不可以重载。
https://www.shititong.cn/cha-kan/shiti/0005e1b4-86b8-0cc8-c04c-ee30166b1a02.html
点击查看题目
28. (单选题)
当方法遇到异常又不知如何处理时,下列哪种说法是正确的( )
https://www.shititong.cn/cha-kan/shiti/0005e1b4-86b7-d618-c04c-ee30166b1a00.html
点击查看题目
首页
>
财会金融
>
Java计算机考试题题库
题目内容
(
单选题
)
手机预览
Java计算机考试题题库

11 }

答案:空

分享
Java计算机考试题题库
相关题目
4. (填空题)若int []a={12,45,34,46,23}; ,则a[2]= ______。
https://www.shititong.cn/cha-kan/shiti/0005e1b3-7b7a-3760-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
点击查看答案
35. (单选题)
String或StringBuffer类的对象在调用以下哪个方法时其自身会发生更改?( )

A.  String类的charAt()方法

B.  StringBuffer类的length()方法

C.  StringBuffer类的reverse ()方法

D.  String类的toUpperCase()方法

https://www.shititong.cn/cha-kan/shiti/0005e1b4-86b7-e5b8-c04c-ee30166b1a00.html
点击查看答案
45. (单选题)下列哪个叙述是正确的?

A.   String 类不可以有子类。

B.   String 类在java.util包中。

C.   "abc"=="abc"的值是false 。

D.   "abc".equals("Abc")的值是true。

https://www.shititong.cn/cha-kan/shiti/0005e1b4-86b7-f558-c04c-ee30166b1a01.html
点击查看答案
53. (判断题) Java是一种面向对象的程序设计语言。
https://www.shititong.cn/cha-kan/shiti/0005e1b4-86b7-87f8-c04c-ee30166b1a01.html
点击查看答案
64. (判断题)
this可以出现在实例方法和构造方法中。
https://www.shititong.cn/cha-kan/shiti/0005e1b4-86b7-8fc8-c04c-ee30166b1a02.html
点击查看答案
33. (单选题)
下列程序段运行后,变量temp的值是( )。
int temp = 2 ;
temp++;
temp*=5;
temp/=2;

A.   15

B.   7.5

C.   2

D.   7

https://www.shititong.cn/cha-kan/shiti/0005e1b4-86b7-dde8-c04c-ee30166b1a02.html
点击查看答案
14. (单选题)
以下由do...while语句构成的循环的执行次数是( )。
int k=0;
do{
++k;
}while(k<1);

A.   无限次

B.   有语法错误,不能执行

C.   一次也不执行

D.   执行一次

https://www.shititong.cn/cha-kan/shiti/0005e1b3-7b7a-1ff0-c04c-ee30166b1a00.html
点击查看答案
65. (判断题)static方法不可以重载。
https://www.shititong.cn/cha-kan/shiti/0005e1b4-86b8-0cc8-c04c-ee30166b1a02.html
点击查看答案
28. (单选题)
当方法遇到异常又不知如何处理时,下列哪种说法是正确的( )

A.  嵌套异常

B.  声明异常

C.  捕获异常

D.  抛出异常

https://www.shititong.cn/cha-kan/shiti/0005e1b4-86b7-d618-c04c-ee30166b1a00.html
点击查看答案
试题通小程序
试题通app下载