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

A、  第2行

B、  第3行

C、  第6行

D、  第7行

答案:C

Java计算机考试题题库
64. (判断题)
this可以出现在实例方法和构造方法中。
https://www.shititong.cn/cha-kan/shiti/0005e1b4-86b7-8fc8-c04c-ee30166b1a02.html
点击查看题目
2. (判断题)Java中被final关键字修饰的变量,不能被重新赋值。
https://www.shititong.cn/cha-kan/shiti/0005e1b3-7b7a-4318-c04c-ee30166b1a00.html
点击查看题目
1. (单选题)不是Java关键字的是( )。
https://www.shititong.cn/cha-kan/shiti/0005e1b3-7b7a-0498-c04c-ee30166b1a03.html
点击查看题目
13. (单选题)
下列关于变量的叙述哪个是错的?( )
https://www.shititong.cn/cha-kan/shiti/0005e1b4-86b7-b2f0-c04c-ee30166b1a00.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. (单选题)下列方法定义中,正确的是( )。
https://www.shititong.cn/cha-kan/shiti/0005e1b3-7b7a-6a28-c04c-ee30166b1a04.html
点击查看题目
41. (单选题)下列哪个叙述是正确的?
https://www.shititong.cn/cha-kan/shiti/0005e1b4-86b7-7470-c04c-ee30166b1a00.html
点击查看题目
16. (单选题)
编译运行以下程序后,关于输出结果的说明正确的是 ( )
public class Conditional{
public static void main( ){
int x=4;
System.out.println("value is "+ ((x>4) ? 99 :9));
}
}
https://www.shititong.cn/cha-kan/shiti/0005e1b4-86b7-b6d8-c04c-ee30166b1a01.html
点击查看题目
25. (单选题)使用this调用类的构造方法,下面的说法错误的是?( )
https://www.shititong.cn/cha-kan/shiti/0005e1b3-7b7a-3378-c04c-ee30166b1a01.html
点击查看题目
56. (判断题)表达式 new String( )== "abc"的值是true。( )
https://www.shititong.cn/cha-kan/shiti/0005e1b4-86b8-04f8-c04c-ee30166b1a02.html
点击查看题目
首页
>
财会金融
>
Java计算机考试题题库
题目内容
(
单选题
)
手机预览
Java计算机考试题题库

12 }

A、  第2行

B、  第3行

C、  第6行

D、  第7行

答案:C

分享
Java计算机考试题题库
相关题目
64. (判断题)
this可以出现在实例方法和构造方法中。
https://www.shititong.cn/cha-kan/shiti/0005e1b4-86b7-8fc8-c04c-ee30166b1a02.html
点击查看答案
2. (判断题)Java中被final关键字修饰的变量,不能被重新赋值。
https://www.shititong.cn/cha-kan/shiti/0005e1b3-7b7a-4318-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
点击查看答案
13. (单选题)
下列关于变量的叙述哪个是错的?( )

A.  局部变量在使用前必须被初始化 ;

B.  实例变量是类的成员变量 ;

C.  实例变量用关键字static声明;

D.  在方法中定义的局部变量在该方法被执行时创建 ;

https://www.shititong.cn/cha-kan/shiti/0005e1b4-86b7-b2f0-c04c-ee30166b1a00.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. (单选题)下列方法定义中,正确的是( )。

A.   int x( ){ char ch='a'; return (int)ch; }

B.   void x( ){ ...return true; }

C.   int x( ){ ...return true; }

D.   int x( int a, b){ return a+b; }

https://www.shititong.cn/cha-kan/shiti/0005e1b3-7b7a-6a28-c04c-ee30166b1a04.html
点击查看答案
41. (单选题)下列哪个叙述是正确的?

A.   final 类不可以有父类。

B.   可以用new运算符和abstract类的构造方法创建对象。

C.   如果一个类中有abstract方法,这个类必须是abstract类。

D.   static方法也可以同时是abstract方法。

https://www.shititong.cn/cha-kan/shiti/0005e1b4-86b7-7470-c04c-ee30166b1a00.html
点击查看答案
16. (单选题)
编译运行以下程序后,关于输出结果的说明正确的是 ( )
public class Conditional{
public static void main( ){
int x=4;
System.out.println("value is "+ ((x>4) ? 99 :9));
}
}

A.  输出结果为:value is 99.9 ;

B.  输出结果为:value is 9

C.  编译错误 ;

D.  输出结果为:value is 99 ;

https://www.shititong.cn/cha-kan/shiti/0005e1b4-86b7-b6d8-c04c-ee30166b1a01.html
点击查看答案
25. (单选题)使用this调用类的构造方法,下面的说法错误的是?( )

A.   可以在一个类的两个构造方法中使用this互相调用

B.   只能在构造方法中使用this调用其它的构造方法

C.   使用this调用其它构造方法的语句必须放在第一行

D.   使用this调用构造方法的格式为this([参数1,参数2…])

解析:null
填空题

https://www.shititong.cn/cha-kan/shiti/0005e1b3-7b7a-3378-c04c-ee30166b1a01.html
点击查看答案
56. (判断题)表达式 new String( )== "abc"的值是true。( )
https://www.shititong.cn/cha-kan/shiti/0005e1b4-86b8-04f8-c04c-ee30166b1a02.html
点击查看答案
试题通小程序
试题通app下载