___ D______ is a software that interprets Java bytecode.
单选题 (2 分) 2 分
A.
Java compiler
B.
Java API
C.
Java debugger
D.
Java virtual machine
One byte(字节) has B__ bits(位).
单选题 (2 分) 2 分
A.
8
B.
12
C.
4
D.
16
If you forget to put a closing quotation mark on a string, what kind error will be raised? A
单选题 (2 分) 2 分
A.
a compilation error(编译错误)
B.
a logic error(逻辑错误)
C.
a runtime error(运行错误)
The _C loads(加载) Java bytecode to the memory(内存).
单选题 (2 分) 2 分
A.
Java compiler
B.
bytecode verifier
C.
class loader
D.
Java virtual machine
Computer can execute(执行) the code in D__.
单选题 (2 分) 2 分
A.
assembly language
B.
none of the above
C.
high-level language
D.
machine language
____ B____ consists of a set of separate programs for developing(开发) and testing(测试) Java programs, each of which is invoked from a command line.
单选题 (2 分) 2 分
A.
Java API
B.
Java JDK
C.
Java language specification
D.
Java IDE
Which of the following lines is not a Java comment(注释)? CE
多选题 (2 分) 2 分
A.
// comments
B.
/* comments */
C.
-- comments
D.
/** comments */
E.
** comments **
单行注释以 // 开头,行末为结尾
多行注释以 /* 开头, / 为结尾
文档注释以 /* 开头, */ 为结尾
11.
Java was developed by A____.
单选题 (2 分) 2 分
A.
Sun Microsystems,
B.
Apple
C.
Microsoft
D.
Cisco Systems
E.
IBM
B is a technical definition(定义) of the language that includes the syntax(语法) and semantics(语义) of the Java programming language.
单选题 (2 分) 2 分
A.
Java API
B.
Java language specification(语言规范)
C.
Java IDE
D.
Java JDK
A is Architecture-Neutral(体系结构中立).
单选题 (2 分) 2 分
A.
Java
B.
Pascal
C.
C++
D.
C
E.
Ada
E___ is a program that runs on a computer to manage(管理) and control a computer’s activities.
单选题 (2 分) 2 分
A.
Java
B.
Interpreter(翻译)
C.
Modem
D.
Compiler(编译器)
E.
Operating system(操作系统)
The extension name of a Java source code file is C
单选题 (2 分)
A.
.obj
B.
.class
C.
.java
D.
.exe
Which of the following are the reserved words?
多选题 (2 分) 2 分 ABCD
A.
void
B.
public
C.
static
D.
class
_________ are secondary storage(二级存储).
多选题 (2 分) 2 分 ABC
A.
hard disk
B.
CD
C.
floppy disk
D.
RAM
Which of the following statements is correct?
单选题 (2 分) 2 分 E
A.
Every line in a program must end with a semicolon.
B.
Every method must end with a semicolon.
C.
Every class must end with a semicolon.
D.
Every comment(注释) line must end with a semicolon.
E.
Every statement(语句) in a program must end with a semicolon(分号).
Which of the following are storage devices(存储设备)?
多选题 (2 分) 2 分 ABCD
A.
hard disk
B.
flash stick
C.
floppy disk
D.
CD-ROM
Java A_ can run from a Web browser.
单选题 (2 分) 2 分
A.
applets
B.
servlets
C.
Micro Edition programs
D.
applications
24.
If a program compiles fine, but it produces incorrect result, then the program suffers A__.
单选题 (2 分) 2 分
A.
a logic error
B.
a runtime error
C.
a compilation error
25.
A block is enclosed inside D____.
单选题 (2 分) 2 分
A.
brackets(括号)
B.
parentheses(括弧)
C.
quotes(引号)
D.
braces(大括号)
27.
You use B__ to run a Java program.
单选题 (2 分) 2 分
A.
javac
B.
java
29.
B__ is interpreted(解释性).
单选题 (2 分) 2 分
A.
Pascal
B.
Java
C.
C
D.
C++
E.
Ada
30.
________ is an object-oriented programming language. ACDE
多选题 (2 分) 2 分
A.
C++
B.
C
C.
C#
D.
Java
E.
Python
32.
The speed of the CPU may be measured(衡量) in __________. AC
多选题 (2 分) 2 分
A.
megahertz(兆赫兹)
B.
megabytes(兆字节)
C.
gigahertz(千兆赫兹)
D.
gigabytes(千兆字节)
33.
A contains predefined classes(预定义类) and interfaces(接口) for developing(开发) Java programs.
单选题 (2 分) 2 分
A.
Java API
B.
Java IDE(集成开发环境)
C.
Java JDK
D.
Java language specification(Java语言规范)
34.
Java was originally developed by a team led by James Gosling at Sun Microsystems.
B
判断题 (1 分) 1 分
A.
false
B.
true
35.
A Java application must have a main method.
A
判断题 (1 分) 1 分
A.
true
B.
false
36.
Why do computers use zeros and ones?
B
单选题 (2 分) 2 分
A.
because combinations of zeros and ones can represent any numbers and characters.
B.
because digital devices have two stable states and it is natural to use one state for 0 and the other for 1.
C.
because binary numbers are the bases upon which all other number systems are built.
D.
because binary numbers are simplest.
37.
____________ are instructions to the computer.
CD
多选题 (2 分) 2 分
A.
Keyboards
B.
Hardware
C.
Programs
D.
Software
38.
__C is an operating system(操作系统).
单选题 (2 分) 2 分
A.
Ada
B.
C++
C.
Windows XP
D.
Visual Basic
E.
Java
39.
A Java interpreter is a program that translates Java source code into Java bytecode.
B
判断题 (1 分) 1 分
A.
true
B.
false
40.
Java source code can be executed on a Java Virtual Machine.
B
判断题 (1 分) 1 分
A.
true
B.
false
41.
_D translates high-level language program into machine language program.
单选题 (2 分) 2 分
A.
CPU
B.
An assembler(汇编器)
C.
The operating system
D.
A compiler(编译器)
42.
Which JDK command is correct to run a Java application in ByteCode.class?
A
单选题 (2 分) 2 分
A.
java ByteCode
B.
javac ByteCode
C.
javac ByteCode.java
D.
java ByteCode.class
E.
JAVAC ByteCode
43.
B__ is a device(设备) to connect a computer to a local area network (LAN).
单选题 (2 分) 2 分
A.
DSL(数字用户线路)
B.
NIC(线)
C.
Regular modem(普通调制解调器)
D.
Cable modem(电缆调制解调器)
45.
Which of the following statements is true?
A
单选题 (2 分) 2 分
A.
A Java applet(小程序) can be executed from a Web browser.
B.
A Java application(应用程序) can be executed from a Web browser.
47.
The compiler generates bytecode even if the program has syntax errors.
B
判断题 (1 分) 1 分
A.
true
B.
false
48.
The JDK command to compile a class in the file Test.java is
E
单选题 (2 分) 2 分
A.
javac Test
B.
JAVAC Test.java
C.
java Test
D.
java Test.java
E.
javac Test.java
49.
A Java program block starts with an open brace ({) and ends with a closing brace (}).
A
回答错误
判断题 (1 分) 0 分
A.
true
B.
false
50.
The command to compile a class in the file Test.java is
A
单选题 (2 分) 2 分
A.
javac Test.java
B.
java Test.java
C.
javac Test
D.
JAVAC Test.java
E.
java Test
52.
The extension name of a Java bytecode file is
D
单选题 (2 分) 0 分
A.
.obj
B.
.java
C.
.exe
D.
.class
53.
Suppose you define a Java class as follows:
public class Test {
}
In order to compile this program, the source code should be stored in a file named
C
单选题 (2 分) 2 分
A.
Any name with extension .java
B.
Test.doc
C.
Test.java
D.
Test.txt
E.
Test.class