Multiple Choice Identify the
choice that best completes the statement or answers the question.
|
|
1.
|
JavaBeans provide the benefit of ____.
a. | aggregation | c. | portability | b. | hosting | d. | reusability |
|
|
2.
|
____ are insertions within the code that explain the purpose of the code
statements.
a. | Comments | c. | Requirements | b. | Algorithms | d. | Solutions |
|
|
3.
|
____ are values that cause a certain rule to become effective.
a. | Boundary values | c. | Operation values | b. | Method values | d. | Trigger values |
|
|
4.
|
In programming, an action is ____ if it takes place without any visible effect
other than the desired output.
a. | efficient | c. | robust | b. | parsimonious | d. | transparent |
|
|
5.
|
____ allows an instruction to be given to an object using a generalized rather
than a specific, detailed command.
a. | Aggregation | c. | Inheritance | b. | Encapsulation | d. | Polymorphism |
|
|
6.
|
A(n) ____ is a location in computer memory that can change values as the code
executes.
a. | argument | c. | parameter | b. | identifier | d. | variable |
|
|
7.
|
Which of the following is not a characteristic of the main()
method?
a. | it is public | b. | it is static | c. | its return type is
void | d. | it has a parameter with an Integer data type |
|
|
8.
|
The System class extends methods from its superclass, which is the ____
class.
a. | Array | c. | Object | b. | Exception | d. | JavaBean |
|
|
9.
|
A(n) ____, identified by the = new notation, declares the type of data or object
to be stored and assigns it a variable name in the computer's memory.
a. | constructor | c. | declarer | b. | destructor | d. | initializer |
|
|
10.
|
The ____ method accepts horizontal and vertical coordinates as parameters that
identify where to draw the graphic.
a. | drawImage() | c. | getImage() | b. | getDocumentBase() | d. | setBackground() |
|
|
11.
|
The ____ of a class are instructions that the class uses to manipulate values,
generate output, or perform actions.
a. | attributes | c. | functions | b. | classes | d. | methods |
|
|
12.
|
A(n) ____ is any word you choose to name an item in a Java program.
a. | argument | c. | parameter | b. | identifier | d. | variable |
|
|
13.
|
A ____ error can surface during execution due to an unanticipated action of the
user.
a. | logic | c. | syntax | b. | semantic | d. | system |
|
|
14.
|
Typing a(n) ____ after the package name in an import statement tells the program
to load all the classes within a package.
a. | asterisk | c. | forward slash | b. | comma | d. | semicolon |
|
|
15.
|
Which of the following is not an advantage of using Applet Viewer rather
than a browser?
a. | Applet Viewer ignores irrelevant HTML code | b. | Applet Viewer does
not have to be Java-enabled | c. | Applet Viewer uses less memory than a
browser | d. | Applet Viewer catches incorrect references to an
applet |
|
True/False Indicate whether the
statement is true or false.
|
|
16.
|
Java is not suitable for developing programs that are distributed over a
network.
|
|
17.
|
The impetus, or trigger, that causes a message to be sent to an object must come
from another object.
|
|
18.
|
The Java Applet Viewer is part of the Java SDK.
|
|
19.
|
In TextPad, the Save button is enabled only when changes have been made to the
document.
|
|
20.
|
The compilation process creates a new file for each class in a program.
|
|
21.
|
JavaScript is used to insert code statements directly into the HTML of a Web
page.
|
|
22.
|
Servlets can be used with Java Server Pages to separate the business logic on
the server from the display logic on the client machine.
|
|
23.
|
Comments are executed before the program runs.
|
|
24.
|
The import statement is placed at the end of the Java source code.
|
|
25.
|
The logic of assigning a value to a variable in Java works from left to
right.
|