When you show abstract classes and methods in class diagrams, their names appear
ID: 3691437 • Letter: W
Question
When you show abstract classes and methods in class diagrams, their names appear in ____.
italics
all caps
bold
blue
10 points
QUESTION 2
Before entering a loop, the first input statement, or ____, is retrieved.
priming read
posttest loop
loop body
empty body
10 points
QUESTION 3
A nonstatic method cannot override a static member of a parent class.
True
False
10 points
QUESTION 4
Due to automatic type promotion, when a method with a double parameter is passed an integer, the integer will be promoted to a(n) ____.
boolean
double
short
integer
10 points
QUESTION 5
You write pseudocode in everyday language, not the syntax used in a programming language.
True
False
10 points
QUESTION 6
Logic errors are easily identified when a program is compiled.
True
False
10 points
QUESTION 7
Statements in which an if structure is contained inside another if structure are commonly called ____ if statements.
inside
blocked
nested
logical
10 points
QUESTION 8
Using the keyword ____ provides you with an intermediate level of security between public and private access.
super
this
protected
secure
10 points
QUESTION 9
The ____ operator is written as the exclamation point ( ! ).
NOT
assignment
equality
AND
10 points
QUESTION 10
When you place a component on the screen, the vertical position is the x-axis and the horizontal position is the y-axis.
True
False
10 points
QUESTION 11
When array elements are passed by value, a copy of the value is made and used within the receiving method.
True
False
10 points
QUESTION 12
{
public static void main(String[] args)
{
System.out.println(“First Java application”);
}
}
Given the above code, which item identifies the access specifier?
public
First
static
void
10 points
QUESTION 13
A ____ is a component that combines a button or an editable field and a drop-down list.
JCheckBox
JTextBox
JButton
JComboBox
10 points
QUESTION 14
Methods that retrieve values are called ____ methods.
static
mutator
accessor
class
10 points
QUESTION 15
An error is generated by the compiler when you attempt to override a static method with a nonstatic method.
True
False
10 points
QUESTION 16
Java contains a class named ____ that allows you to produce dialog boxes.
JBox
JGUI
JDialog
JOptionPane
10 points
QUESTION 17
A(n) ____ variable is known only within the boundaries of the method.
double
local
method
instance
10 points
QUESTION 18
When a numeric variable is concatenated to a String, the entire expression becomes a(n) ____.
String
constant
int
method
10 points
QUESTION 19
Each JMenu can contain options, called JMenuItems, or can contain submenus that are ____.
JMenus
JMenuBars
JSubMenus
JMenuChildren
10 points
QUESTION 20
The ____ operator is always evaluated before the OR operator.
Logical
Assignment
Conditional
AND
10 points
QUESTION 21
Locating and repairing all syntax errors is part of the process of ____ a program.
compiling
executing
interpreting
debugging
10 points
QUESTION 22
Which of the following is NOT an initial value assigned to an object’s data field by a default constructor?
numeric fields set to 0
a field of object references set to null
character fields set to Unicode ‘u0000’
Boolean fields set to true
10 points
QUESTION 23
Regarding enumerations, the ____ method returns the name of the calling constant object.
nameOf
constName
ordinal
toString
10 points
QUESTION 24
The compiler determines which version of a method to call by the method’s ____.
constructor
name
signature
output
10 points
QUESTION 25
When an application contains just one version of a method, you can call the method using a(n) ____ of the correct data type.
constructor
parameter
scope
output
10 points
QUESTION 26
When you initialize parallel arrays, it is convenient to use ____ so that the values that correspond to each other visually align on the screen or printed page.
spacing
indentation
tabs
dashes
10 points
QUESTION 27
An additional layered pane exists above the root pane, but it is not often used explicitly by Java programmers.
True
False
10 points
QUESTION 28
If you create an empty method within an abstract class, the method is abstract even if you do not explicitly use the keyword abstract.
True
False
10 points
QUESTION 29
Which FontMetrics class method returns information about the part of characters that hang below the baseline?
getAscent()
getLeading()
getHeight()
get_Descent()
10 points
QUESTION 30
When working with logical operators, you can always use ____ to change precedence.
parentheses
conditional operators
break statements
semicolons
10 points
QUESTION 31
int[][] myVals = {{2, 4, 6},
{1, 3, 5, 7}};
Using the above array, what is the value of myVals.length?
5
1
2
4
10 points
QUESTION 32
The String class ____ method evaluates the contents of two String objects to determine if they are equivalent.
charAt()
equals()
toString()
replace()
10 points
QUESTION 33
When a protected data field or method is created, it can be used within its own class or in any classes extended from that class; but it cannot be used by outside classes.
True
False
10 points
QUESTION 34
A ____ is placed at the top of a container and contains user options.
content pane
glass pane
containment hierarchy
menu bar
10 points
QUESTION 35
Which of the following statements will change the value displayed in a JLabel named hello?
hello = setText("Hello");
setText.hello = "Hello"
setText = hello
hello.setText("Hello");
10 points
QUESTION 36
While a class can inherit from multiple abstract superclasses, it implement only one interface.
True
False
10 points
QUESTION 37
If you want all objects to share a single nonchanging value, then the field is static and ______.
class
permanent
end
final
10 points
QUESTION 38
The simplest possible sort involves two values that are out of order.
True
False
10 points
QUESTION 39
When you create a superclass and one or more subclasses, each object of each subclass is a subclass object.
True
False
10 points
QUESTION 40
When constructing a Font object, which of the following arguments is NOT required?
style
typeface
point size
weight
10 points
QUESTION 41
It is common to create an interface when you want a class to implement behavior from more than one parent.
True
False
10 points
QUESTION 42
The following statement produces a dark purple color that has green and blue components, but no red:
Color darkPurple = new Color(100, 0, 100);
True
False
10 points
QUESTION 43
An application’s main() method must have a void return type.
True
False
10 points
QUESTION 44
The parent class of MouseEvent is ____.
EventObject
AWTEvent
UserEvent
InputEvent
10 points
QUESTION 45
The expression boolean isTenLarger = (10 < 5) will produce a value of true.
True
False
10 points
QUESTION 46
A ____ is an error not detected until the program asks the computer to do something wrong, or even illegal, while executing.
package
run-time error
Java API
syntax error
10 points
QUESTION 47
You can create a confirm dialog box with five arguments.
True
False
10 points
QUESTION 48
You can leave out the ____ statements in a switch structure.
case
break
switch
if
10 points
QUESTION 49
Clicking a component results in a(n) ____.
WindowEvent
ItemEvent
ActionEvent
MouseEvent
10 points
QUESTION 50
Method names that begin with ____ and set are very typical.
read
call
get
next
a.italics
b.all caps
c.bold
d.blue
Explanation / Answer
1)
Hence, the correct option is a. italics.
2)
Hence, the correct option is a. priming read.
3)
Hence, the correct option is True.
4)
Hence, the correct option is b. double.
5)
Hence, the correct option is True.
6)
Hence the correct option is False.
7)
Hence the correct option c. nested.
8)
Hence the correct option is c. protected.
9)
Hence the correct option is a. NOT.
10)
Hence the correct option is False.
11)
Hence the correct option is True.
12)
Hence the correct option a. public.
13)
Hence the correct option d. JComboBox.
14)
Hence the correct option c. accessor.
15)
Hence the correct option is True.
Remaining Answers:
16) The correct option is d. JOptionPane.
17) The correct option is b. local.
18) The correct option is a. String.
19) The correct option is a. JMenus.
20) The correct option is d. AND.
21) The correct option is d. debugging.
22) The correct option is d. Boolean fields set to true.
23) The correct option is d. toString.
24) The correct option is c. signature.
25) The correct option is b. parameter.
26) The correct option is a. spacing.
27) The correct option is True.
28) The correct option is True.
29) The correct option is d. get_Descent().
30) The correct option is a. parentheses.
31) The correct option is c. 2.
32) The correct option is b. equals().
33) The correct option is True.
34) The correct option is d. menu bar.
35) The correct option is d. hello.setText("Hello");.
36) The correct option is False
37) The correct option is d. final.
38) The correct option is True.
39) The correct option is True.
40) The correct option is d. weight.
41) The correct option is True.
42) The correct option is False.
43) The correct option is True.
44) The correct option is d. InputEvent.
45) The correct option is False.
46) The correct option is b. run-time error.
47) The correct option is True.
48) The correct option is b. break.
49) The correct option is c. ActionEvent.
50) The correct option is c. get.
Related Questions
drjack9650@gmail.com
Navigate
Integrity-first tutoring: explanations and feedback only — we do not complete graded work. Learn more.