Java Test Bank
Java Test Bank
1
Copyright © 2016 Pearson Education, Inc.
8) When a computer is running a program, the CPU is engaged in a process formally known as:
A) The decrypt/validate/commit cycle
B) Low-level machine mode
C) The fetch/decode/execute cycle
D) Parallax data execution
2
Copyright © 2016 Pearson Education, Inc.
13) The original name for Java was:
A) Java
B) HotJava
C) Elm
D) Oak
17) Suppose you are at an operating system command line, and you are going to use the following
command to compile a program:
javac MyClass.java
18) In the programming process which of the following is NOT involved in defining what the program is
to do:
A) Process
B) Compile code
C) Input
D) Output
E) Purpose
19) One of the design tools used by programmers when creating a model of the program is:
A) Disk drive
B) Compiler
C) ALU
3
Copyright © 2016 Pearson Education, Inc.
D) Pseudocode
20) A runtime error is usually the result of:
A) A logical error
B) A syntax error
C) A compilation error
D) Bad data
23) ________ results in only the object's methods being able to directly access and make the changes to the
object's data.
A) Component reusability
B) Classes
C) Data hiding
D) Procedures
4
Copyright © 2016 Pearson Education, Inc.
25) Each different type of CPU has its own:
A) Syntax
B) Firmware
C) Machine language
D) Software
26) Internally, the central processing unit (CPU) consists of two parts:
A) The control unit and the arithmetic and logic unit (ALU)
B) The control unit and main memory
C) The arithmetic and login unit (ALU) and main memory
D) The input and output devices
5
Copyright © 2016 Pearson Education, Inc.
33) Because Java byte code is the same on all computers, compiled Java programs:
A) Must be re-compiled for each different machine it is run on
B) Cannot run on Linux systems
C) Are non-existent
D) Are highly portable
35) Which of the following will run the compiled program ReadIt?
A) java ReadIt.java
B) java ReadIt
C) run ReadIt
D) go ReadIt
6
Copyright © 2016 Pearson Education, Inc.
38) This is a set of programming language statements that, together, perform a specific task.
A) Object
B) Compiler
C) Procedure
D) Pseudocode
1) The computer is a tool used by so many professions that it cannot be easily categorized.
2) Without programmers, the users of computers would have no software, and without software,
computers would not be able to do anything.
3) Application software refers to programs that make the computer useful to the user.
5) When an object's internal data is hidden from outside code and access to that data is restricted to the
object's methods, the data is protected from accidental corruption.
7) The Java Virtual Machine is a program that reads Java byte code instructions and executes them as they
are read.
9) Logical errors are mistakes that cause the program to produce erroneous results.
10) Encapsulation refers to the combining of data and code into a single object.
7
Copyright © 2016 Pearson Education, Inc.