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