Multiple Choice Identify the
choice that best completes the statement or answers the question.
|
|
1.
|
A(n) ____ is a small program that can be downloaded and executed as part of a
displayed Web page.
a. | applet | c. | control structure | b. | servlet | d. | superclass |
|
|
2.
|
An IDE also is called a ____.
a. | builder tool | c. | scripting tool | b. | mini-browser | d. | text editor |
|
|
3.
|
The keyword, ____, is required by the drawImage() method to hold the location of
the image while it is being loaded from disk.
a. | catch | c. | this | b. | extends | d. | var |
|
|
4.
|
In the order of operator precedence for numeric expressions, ____ operations are
performed first.
a. | addition and/or subtraction | c. | modular
division | b. | integer division | d. | multiplication and/or division |
|
|
5.
|
Indentation rules are part of a programmer's ____ convention.
a. | class | c. | language | b. | coding | d. | naming |
|
|
6.
|
A(n) ____ operator is used to connect two conditional expressions.
a. | arithmetic | c. | logical | b. | equality | d. | relational |
|
|
7.
|
Which of the following exceptions is not an Exception class defined in
the SDK?
a. | ArithmeticException | c. | IOException | b. | DivideException | d. | NumberFormatException |
|
|
8.
|
A switch statement, depending on the evaluated value, transfers control to the
appropriate ____ statement.
a. | case | c. | try | b. | catch | d. | while |
|
|
9.
|
The ____ method is triggered when a user clicks an option button in a
CheckboxGroup.
a. | addItemListener() | c. | itemStateChanged() | b. | getState() | d. | setState() |
|
|
10.
|
The index number assigned to elements of an array also is called a ____.
a. | counter | c. | register | b. | member | d. | subscript |
|
|
11.
|
Which of the following is the correct shortcut syntax for creating and
initializing an array?
a. | boolean[] results = {true, false, true}; | c. | boolean[] results =
[true, false, true]; | b. | boolean results = {true, false,
true}; | d. | boolean[3]
results = [true, false, true]; |
|
|
12.
|
A(n) ____ is convenient when assigning values to two-dimensional arrays or when
keeping track of a table of numbers.
a. | add-and-assign operator | c. | nested loop | b. | control
array | d. | while
loop |
|
|
13.
|
The ____ is an object that implements the WindowListener interface.
a. | WindowAdapter | c. | WindowObject | b. | WindowEvent | d. | EventHandler |
|
|
14.
|
The main() method of the Calculator class is responsible for ____.
a. | adding the ActionListeners | b. | declaring and initializing the Frame
components | c. | constructing an instance of the Calculator | d. | setting up the menu
system |
|
|
15.
|
The setBounds() method takes ____ arguments.
|
True/False Indicate whether the
statement is true or false.
|
|
16.
|
A servlet is launched from a browser.
|
|
17.
|
Existing programs do not need constant maintenance or monitoring.
|
|
18.
|
The final phase of the program development cycle, document the solution,
contains only internal documentation related to the design and code.
|
|
19.
|
The Java compiler accepts keywords for class names.
|
|
20.
|
Java cannot perform mathematical operations on a String.
|
|
21.
|
Buttons inherit their color and shape characteristics from the operating
system.
|
|
22.
|
It is common practice to identify an ActionEvent parameter as e.
|
|
23.
|
WindowAdapter is a Java interface.
|
|
24.
|
The parseDouble() method converts a String to a double.
|
|
25.
|
The format() method converts a double into a String.
|