APP下载
首页
>
财会金融
>
Java计算机考试题题库
搜索
Java计算机考试题题库
题目内容
(
单选题
)
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; }

答案:A

Java计算机考试题题库
1. (单选题)不是Java关键字的是( )。
https://www.shititong.cn/cha-kan/shiti/0005e1b3-7b7a-0498-c04c-ee30166b1a03.html
点击查看题目
34. (单选题)
结构化程序设计所规定的三种基本控制结构是 ( )。
https://www.shititong.cn/cha-kan/shiti/0005e1b4-86b7-e1d0-c04c-ee30166b1a00.html
点击查看题目
11. (单选题)
分析下面程序,输出结果为( )。
public class Test {
static void leftshift( ){
i*=j;
}
public static void main( ) {
int i=4,j=2;
leftshift( );
System.out.println( );
}
}
https://www.shititong.cn/cha-kan/shiti/0005e1b3-7b7a-6258-c04c-ee30166b1a01.html
点击查看题目
5. (单选题)Outer类中定义了一个成员内部类Inner,需要在main()方法中创建Inner类实例对象,以下四种方式哪一种是正确的?( )
https://www.shititong.cn/cha-kan/shiti/0005e1b3-7b7a-56a0-c04c-ee30166b1a00.html
点击查看题目
7. (单选题)设x=1,y=2,z=3,则表达式 y+=z--/++x的值是( )。
https://www.shititong.cn/cha-kan/shiti/0005e1b3-7b7a-1050-c04c-ee30166b1a00.html
点击查看题目
3 //do sth
https://www.shititong.cn/cha-kan/shiti/0005e1b3-7b7a-6a28-c04c-ee30166b1a02.html
点击查看题目
6. (单选题)不是类及类成员访问控制符的是( )。
https://www.shititong.cn/cha-kan/shiti/0005e1b3-7b7a-56a0-c04c-ee30166b1a01.html
点击查看题目
57. (判断题)
类是最重要的“数据类型”,类声明的变量被称为对象变量,简称对象。
https://www.shititong.cn/cha-kan/shiti/0005e1b4-86b7-8be0-c04c-ee30166b1a00.html
点击查看题目
43. (单选题)
设int[][] x = {{1,2},{3},{4,5,6}},则x[1].length()的值为( )。
https://www.shititong.cn/cha-kan/shiti/0005e1b4-86b7-f170-c04c-ee30166b1a01.html
点击查看题目
3. (判断题)注释的作用是使程序在执行时在屏幕上显示//之后的内容。
https://www.shititong.cn/cha-kan/shiti/0005e1b3-7b7a-9138-c04c-ee30166b1a01.html
点击查看题目
首页
>
财会金融
>
Java计算机考试题题库
题目内容
(
单选题
)
手机预览
Java计算机考试题题库

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; }

答案:A

分享
Java计算机考试题题库
相关题目
1. (单选题)不是Java关键字的是( )。

A.   integer

B.   double

C.   float

D.   Char

https://www.shititong.cn/cha-kan/shiti/0005e1b3-7b7a-0498-c04c-ee30166b1a03.html
点击查看答案
34. (单选题)
结构化程序设计所规定的三种基本控制结构是 ( )。

A.  树形、网形、环形

B.  顺序、选择、循环

C.  输入、处理、输出

D.  主程序、子程序、函数

https://www.shititong.cn/cha-kan/shiti/0005e1b4-86b7-e1d0-c04c-ee30166b1a00.html
点击查看答案
11. (单选题)
分析下面程序,输出结果为( )。
public class Test {
static void leftshift( ){
i*=j;
}
public static void main( ) {
int i=4,j=2;
leftshift( );
System.out.println( );
}
}

A.   8

B.   2

C.   4

D.   16

https://www.shititong.cn/cha-kan/shiti/0005e1b3-7b7a-6258-c04c-ee30166b1a01.html
点击查看答案
5. (单选题)Outer类中定义了一个成员内部类Inner,需要在main()方法中创建Inner类实例对象,以下四种方式哪一种是正确的?( )

A.   Inner in = new Inner()

B.   Inner in = new Outer.Inner();

C.   Outer.Inner in = new Outer.Inner();

D.   Outer.Inner in = new Outer().new Inner();

https://www.shititong.cn/cha-kan/shiti/0005e1b3-7b7a-56a0-c04c-ee30166b1a00.html
点击查看答案
7. (单选题)设x=1,y=2,z=3,则表达式 y+=z--/++x的值是( )。

A.   3

B.   3. 5

C.   4

D.   5

https://www.shititong.cn/cha-kan/shiti/0005e1b3-7b7a-1050-c04c-ee30166b1a00.html
点击查看答案
3 //do sth
https://www.shititong.cn/cha-kan/shiti/0005e1b3-7b7a-6a28-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
点击查看答案
57. (判断题)
类是最重要的“数据类型”,类声明的变量被称为对象变量,简称对象。

解析:null
(判断题)
构造方法没有返回值类型。

https://www.shititong.cn/cha-kan/shiti/0005e1b4-86b7-8be0-c04c-ee30166b1a00.html
点击查看答案
43. (单选题)
设int[][] x = {{1,2},{3},{4,5,6}},则x[1].length()的值为( )。

A.   1

B.   2

C.   3

D.   4

https://www.shititong.cn/cha-kan/shiti/0005e1b4-86b7-f170-c04c-ee30166b1a01.html
点击查看答案
3. (判断题)注释的作用是使程序在执行时在屏幕上显示//之后的内容。
https://www.shititong.cn/cha-kan/shiti/0005e1b3-7b7a-9138-c04c-ee30166b1a01.html
点击查看答案
试题通小程序
试题通app下载