APP下载
首页
>
财会金融
>
Java计算机考试题题库
搜索
Java计算机考试题题库
题目内容
(
单选题
)
8. (单选题)下列选项中,语法正确的Java控制语句是( )。

A、  if(x>0) then x=x-1;

B、  for(i=0;i<=5;i++) System.out.println(i);

C、  while(x) x++;(x为整数)

D、  switch(x){ case 0.0;break; case 1.0;break; default:break;}

答案:B

Java计算机考试题题库
9 Person t=new Teacher();
https://www.shititong.cn/cha-kan/shiti/0005e1b4-86b7-1a98-c04c-ee30166b1a01.html
点击查看题目
3 //do sth
https://www.shititong.cn/cha-kan/shiti/0005e1b3-7b7a-6a28-c04c-ee30166b1a02.html
点击查看题目
11. (单选题)( )类位于异常类层次的最顶层。
https://www.shititong.cn/cha-kan/shiti/0005e1b4-86b7-2a38-c04c-ee30166b1a01.html
点击查看题目
1 class Person{
https://www.shititong.cn/cha-kan/shiti/0005e1b4-86b7-16b0-c04c-ee30166b1a02.html
点击查看题目
64. (判断题)
this可以出现在实例方法和构造方法中。
https://www.shititong.cn/cha-kan/shiti/0005e1b4-86b7-8fc8-c04c-ee30166b1a02.html
点击查看题目
4. (判断题)接口中只能定义常量和抽象方法。
https://www.shititong.cn/cha-kan/shiti/0005e1b3-7b7a-4318-c04c-ee30166b1a02.html
点击查看题目
6. (单选题)不是类及类成员访问控制符的是( )。
https://www.shititong.cn/cha-kan/shiti/0005e1b3-7b7a-56a0-c04c-ee30166b1a01.html
点击查看题目
52. (填空题)Java中的用于产生随机数的类是_________,它位于java.util包中
https://www.shititong.cn/cha-kan/shiti/0005e1b4-86b8-0110-c04c-ee30166b1a02.html
点击查看题目
7. (单选题)
应用程序的main方法中有以下语句,则输出的结果是( )。
int b[][]={{1}, {2,3}, {4,5,6}};
int sum=1;
for(int i=0;i<b.length-1;i++) {
for(int j=0;j<b[i].length-1;j++) {
sum*=b[i][j];
}
}
System.out.println( );
https://www.shititong.cn/cha-kan/shiti/0005e1b4-86b7-9f68-c04c-ee30166b1a00.html
点击查看题目
8. (单选题)下面哪种类型的文件可以在Java虚拟机中运行?( )
https://www.shititong.cn/cha-kan/shiti/0005e1b3-7b79-e170-c04c-ee30166b1a01.html
点击查看题目
首页
>
财会金融
>
Java计算机考试题题库
题目内容
(
单选题
)
手机预览
Java计算机考试题题库

8. (单选题)下列选项中,语法正确的Java控制语句是( )。

A、  if(x>0) then x=x-1;

B、  for(i=0;i<=5;i++) System.out.println(i);

C、  while(x) x++;(x为整数)

D、  switch(x){ case 0.0;break; case 1.0;break; default:break;}

答案:B

分享
Java计算机考试题题库
相关题目
9 Person t=new Teacher();
https://www.shititong.cn/cha-kan/shiti/0005e1b4-86b7-1a98-c04c-ee30166b1a01.html
点击查看答案
3 //do sth
https://www.shititong.cn/cha-kan/shiti/0005e1b3-7b7a-6a28-c04c-ee30166b1a02.html
点击查看答案
11. (单选题)( )类位于异常类层次的最顶层。

A.   Throwable

B.   Error

C.   Exception

D.   IOException

https://www.shititong.cn/cha-kan/shiti/0005e1b4-86b7-2a38-c04c-ee30166b1a01.html
点击查看答案
1 class Person{
https://www.shititong.cn/cha-kan/shiti/0005e1b4-86b7-16b0-c04c-ee30166b1a02.html
点击查看答案
64. (判断题)
this可以出现在实例方法和构造方法中。
https://www.shititong.cn/cha-kan/shiti/0005e1b4-86b7-8fc8-c04c-ee30166b1a02.html
点击查看答案
4. (判断题)接口中只能定义常量和抽象方法。
https://www.shititong.cn/cha-kan/shiti/0005e1b3-7b7a-4318-c04c-ee30166b1a02.html
点击查看答案
6. (单选题)不是类及类成员访问控制符的是( )。

A.   public

B.   private

C.   static

D.   Protected

https://www.shititong.cn/cha-kan/shiti/0005e1b3-7b7a-56a0-c04c-ee30166b1a01.html
点击查看答案
52. (填空题)Java中的用于产生随机数的类是_________,它位于java.util包中
https://www.shititong.cn/cha-kan/shiti/0005e1b4-86b8-0110-c04c-ee30166b1a02.html
点击查看答案
7. (单选题)
应用程序的main方法中有以下语句,则输出的结果是( )。
int b[][]={{1}, {2,3}, {4,5,6}};
int sum=1;
for(int i=0;i<b.length-1;i++) {
for(int j=0;j<b[i].length-1;j++) {
sum*=b[i][j];
}
}
System.out.println( );

A.   32

B.   720

C.   2

D.   3

https://www.shititong.cn/cha-kan/shiti/0005e1b4-86b7-9f68-c04c-ee30166b1a00.html
点击查看答案
8. (单选题)下面哪种类型的文件可以在Java虚拟机中运行?( )

A.   .java

B.   .jre

C.   .exe

D.   .class

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