APP下载
首页
>
财会金融
>
Java计算机考试题题库
搜索
Java计算机考试题题库
题目内容
(
单选题
)
39. (单选题)
以下代码段执行后的输出结果为( )
int x=-3; int y=-10;
System.out.println( );

A、  -1

B、  2

C、  1

D、  3

答案:A

Java计算机考试题题库
11. (单选题)
以下程序编译后,会产生( )个类文件。
class PrintString{
void print( ){
System.out.println( );
}
}
public class Hello{
public static void main( ){
printString ph=new printString();
ph.print( );
}
}
https://www.shititong.cn/cha-kan/shiti/0005e1b3-7b79-e558-c04c-ee30166b1a01.html
点击查看题目
2. (单选题)下列数据类型中,不是基本数据类型的是( )。
https://www.shititong.cn/cha-kan/shiti/0005e1b3-7b7a-0880-c04c-ee30166b1a00.html
点击查看题目
19. (单选题)对于下列Hello类,哪个叙述是正确的?
class Hello {
https://www.shititong.cn/cha-kan/shiti/0005e1b4-86b7-35f0-c04c-ee30166b1a02.html
点击查看题目
8. (判断题)方法内部类中不能访问外部类的成员变量。
https://www.shititong.cn/cha-kan/shiti/0005e1b3-7b7a-4700-c04c-ee30166b1a02.html
点击查看题目
53. (填空题)JDK中能被捕获处理的异常类,都是_________类的子类或者间接子类。
https://www.shititong.cn/cha-kan/shiti/0005e1b4-86b8-0110-c04c-ee30166b1a03.html
点击查看题目
1. (单选题)
https://www.shititong.cn/cha-kan/shiti/0005e1b4-86b7-8fc8-c04c-ee30166b1a04.html
点击查看题目
47. (单选题)下列哪个叙述是错误的?()
https://www.shititong.cn/cha-kan/shiti/0005e1b4-86b7-fd28-c04c-ee30166b1a00.html
点击查看题目
28. (单选题)当用new运算符和构造方法创建对象时,下列哪个步骤的叙述是正确的?
https://www.shititong.cn/cha-kan/shiti/0005e1b4-86b7-5148-c04c-ee30166b1a00.html
点击查看题目
1. (单选题)不是Java关键字的是( )。
https://www.shititong.cn/cha-kan/shiti/0005e1b3-7b7a-0498-c04c-ee30166b1a03.html
点击查看题目
27. (单选题)在Java中,要想让一个类继承另一个类,可以使用以下哪个关键字?( )
https://www.shititong.cn/cha-kan/shiti/0005e1b3-7b7a-8198-c04c-ee30166b1a00.html
点击查看题目
首页
>
财会金融
>
Java计算机考试题题库
题目内容
(
单选题
)
手机预览
Java计算机考试题题库

39. (单选题)
以下代码段执行后的输出结果为( )
int x=-3; int y=-10;
System.out.println( );

A、  -1

B、  2

C、  1

D、  3

答案:A

分享
Java计算机考试题题库
相关题目
11. (单选题)
以下程序编译后,会产生( )个类文件。
class PrintString{
void print( ){
System.out.println( );
}
}
public class Hello{
public static void main( ){
printString ph=new printString();
ph.print( );
}
}

A.   1

B.   2

C.   3

D.   4

https://www.shititong.cn/cha-kan/shiti/0005e1b3-7b79-e558-c04c-ee30166b1a01.html
点击查看答案
2. (单选题)下列数据类型中,不是基本数据类型的是( )。

A.   字符型

B.   布尔型

C.   类

D.   双精度型

https://www.shititong.cn/cha-kan/shiti/0005e1b3-7b7a-0880-c04c-ee30166b1a00.html
点击查看答案
19. (单选题)对于下列Hello类,哪个叙述是正确的?
class Hello {

A.   Hello类有2个构造方法。

B.   Hello类的int Hello()方法是错误的方法。

C.   Hello类没有构造方法。

D.   Hello无法通过编译,因为其中的hello方法的方法头是错误的(没有类型)

https://www.shititong.cn/cha-kan/shiti/0005e1b4-86b7-35f0-c04c-ee30166b1a02.html
点击查看答案
8. (判断题)方法内部类中不能访问外部类的成员变量。
https://www.shititong.cn/cha-kan/shiti/0005e1b3-7b7a-4700-c04c-ee30166b1a02.html
点击查看答案
53. (填空题)JDK中能被捕获处理的异常类,都是_________类的子类或者间接子类。

解析:null
判断题

https://www.shititong.cn/cha-kan/shiti/0005e1b4-86b8-0110-c04c-ee30166b1a03.html
点击查看答案
1. (单选题)

A.  import

B.  package

C.  class

D.  interface

https://www.shititong.cn/cha-kan/shiti/0005e1b4-86b7-8fc8-c04c-ee30166b1a04.html
点击查看答案
47. (单选题)下列哪个叙述是错误的?()

A.   Integer.parseInt("12.9");会触发NumberFormatException异常。

B.   表达式"bird".contentEquals("bird")的值是true。

C.   表达式"Bird" == "bird"的值是false。

D.   表达式"Bird".equals("bird")的值是true。

解析:null
填空题

https://www.shititong.cn/cha-kan/shiti/0005e1b4-86b7-fd28-c04c-ee30166b1a00.html
点击查看答案
28. (单选题)当用new运算符和构造方法创建对象时,下列哪个步骤的叙述是正确的?

A.   ①为成员变量分配内存,并指定默认值。
②初始化成员变量,即用户声明成员变量时给定的默认值。
③执行构造方法。
④计算出一个引用值。

B.   ①计算出一个引用值。
②为成员变量分配内存,并指定默认值。
③初始化成员变量,即用户声明成员变量时给定的默认值。
④执行构造方法。

C.   ①执行构造方法。
②为成员变量分配内存,并指定默认值。
③初始化成员变量,即用户声明成员变量时给定的默认值。
④计算出一个引用值。

D.   ①为成员变量分配内存,并指定默认值。
②初始化成员变量,即用户声明成员变量时给定的默认值。
③计算出一个引用值。
④执行构造方法。

https://www.shititong.cn/cha-kan/shiti/0005e1b4-86b7-5148-c04c-ee30166b1a00.html
点击查看答案
1. (单选题)不是Java关键字的是( )。

A.   integer

B.   double

C.   float

D.   Char

https://www.shititong.cn/cha-kan/shiti/0005e1b3-7b7a-0498-c04c-ee30166b1a03.html
点击查看答案
27. (单选题)在Java中,要想让一个类继承另一个类,可以使用以下哪个关键字?( )

A.   inherits

B.   implements

C.   extends

D.   Modifies

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