试题通
试题通
APP下载
首页
>
财会金融
>
Java计算机考试题题库
试题通
搜索
Java计算机考试题题库
题目内容
(
单选题
)
12. (单选题)以下选项中,属于不合法的标识符是( )。

A、  Hello_World

B、  class

C、  $123username

D、  username123

答案:B

试题通
Java计算机考试题题库
试题通
48. (填空题)Java中一个字符占用两个字节,所有字符采用的都是_________码表。
https://www.shititong.cn/cha-kan/shiti/0005e1b4-86b7-fd28-c04c-ee30166b1a01.html
点击查看题目
33. (单选题)
下列程序段运行后,变量temp的值是( )。
int temp = 2 ;
temp++;
temp*=5;
temp/=2;
https://www.shititong.cn/cha-kan/shiti/0005e1b4-86b7-dde8-c04c-ee30166b1a02.html
点击查看题目
22. (单选题)下面哪一个是正确的类的声明? ( )
https://www.shititong.cn/cha-kan/shiti/0005e1b3-7b7a-2f90-c04c-ee30166b1a00.html
点击查看题目
4. (填空题)javac.exe和java.exe两个可执行程序存放在JDK安装目录的_________目录下。
https://www.shititong.cn/cha-kan/shiti/0005e1b3-7b7a-00b0-c04c-ee30166b1a00.html
点击查看题目
29. (单选题)对于下列Tom类,哪个叙述是正确的?
public class Test {
public static void main( ){
Tom cat = new Tom();
}
}
class Tom {
void Tom(){
System.out.println( );
}
Tom( ){
System.out.println("你好");
}
}
https://www.shititong.cn/cha-kan/shiti/0005e1b4-86b7-5530-c04c-ee30166b1a00.html
点击查看题目
4.}
https://www.shititong.cn/cha-kan/shiti/0005e1b4-86b7-9b80-c04c-ee30166b1a01.html
点击查看题目
5. (判断题)Java程序里,创建新的类对象用关键字new,回收无用的类对象使用关键字free。
https://www.shititong.cn/cha-kan/shiti/0005e1b3-7b7a-9138-c04c-ee30166b1a03.html
点击查看题目
8. (判断题)方法内部类中不能访问外部类的成员变量。
https://www.shititong.cn/cha-kan/shiti/0005e1b3-7b7a-4700-c04c-ee30166b1a02.html
点击查看题目
3. (填空题)编译Java程序需要使用_________命令。
https://www.shititong.cn/cha-kan/shiti/0005e1b3-7b79-fcc8-c04c-ee30166b1a02.html
点击查看题目
62. (判断题)可以用final修饰构造方法。( )
https://www.shititong.cn/cha-kan/shiti/0005e1b4-86b8-08e0-c04c-ee30166b1a04.html
点击查看题目
首页
>
财会金融
>
Java计算机考试题题库
题目内容
(
单选题
)
手机预览
试题通
Java计算机考试题题库

12. (单选题)以下选项中,属于不合法的标识符是( )。

A、  Hello_World

B、  class

C、  $123username

D、  username123

答案:B

试题通
分享
试题通
试题通
Java计算机考试题题库
相关题目
48. (填空题)Java中一个字符占用两个字节,所有字符采用的都是_________码表。
https://www.shititong.cn/cha-kan/shiti/0005e1b4-86b7-fd28-c04c-ee30166b1a01.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
点击查看答案
22. (单选题)下面哪一个是正确的类的声明? ( )

A.   public void HH{…}

B.   public class Move(){…}

C.   public class void number{}

D.   public class Car{…}

https://www.shititong.cn/cha-kan/shiti/0005e1b3-7b7a-2f90-c04c-ee30166b1a00.html
点击查看答案
4. (填空题)javac.exe和java.exe两个可执行程序存放在JDK安装目录的_________目录下。
https://www.shititong.cn/cha-kan/shiti/0005e1b3-7b7a-00b0-c04c-ee30166b1a00.html
点击查看答案
29. (单选题)对于下列Tom类,哪个叙述是正确的?
public class Test {
public static void main( ){
Tom cat = new Tom();
}
}
class Tom {
void Tom(){
System.out.println( );
}
Tom( ){
System.out.println("你好");
}
}

A.   程序运行时输出:ok。

B.   没有构造方法。

C.   有编译错误,因为创建对象cat使用的不是构造方法,java编译器已经不提供默认的构造方法了。

D.   程序运行时无任何输出。

https://www.shititong.cn/cha-kan/shiti/0005e1b4-86b7-5530-c04c-ee30166b1a00.html
点击查看答案
4.}

A.  import java.awt.*;

B.  package mypackage;

C.  class OtherClass{ }

D.  public class MyClass{ }

https://www.shititong.cn/cha-kan/shiti/0005e1b4-86b7-9b80-c04c-ee30166b1a01.html
点击查看答案
5. (判断题)Java程序里,创建新的类对象用关键字new,回收无用的类对象使用关键字free。
https://www.shititong.cn/cha-kan/shiti/0005e1b3-7b7a-9138-c04c-ee30166b1a03.html
点击查看答案
8. (判断题)方法内部类中不能访问外部类的成员变量。
https://www.shititong.cn/cha-kan/shiti/0005e1b3-7b7a-4700-c04c-ee30166b1a02.html
点击查看答案
3. (填空题)编译Java程序需要使用_________命令。
https://www.shititong.cn/cha-kan/shiti/0005e1b3-7b79-fcc8-c04c-ee30166b1a02.html
点击查看答案
62. (判断题)可以用final修饰构造方法。( )
https://www.shititong.cn/cha-kan/shiti/0005e1b4-86b8-08e0-c04c-ee30166b1a04.html
点击查看答案
试题通小程序
试题通app下载