Object-oriented programmers use the term ____ when a child class contains a field or method that has the same name as one in the parent class.
a.
out of scope
b.
ambiguous
c.
override
d.
parent friendly
c. OVERRIDE
The ____ statement notifies the program that you will be using the data and method names that are part of the imported class or package.
a.
use
b.
package
c.
class
d.
import
D. IMPORT
11. ____ are local classes that have no identifier.
a.
Anonymous classes
b.
Nonstatic member classes
c.
Local classes
d.
static member classes
A. ANONYMOUS
The methods of LocalDate include getMonth() and getDayOfWeek(). Each of these methods returns a(n) ____, which is a data type that consists of a list of values.
a.
array
b.
constant
c.
shadow array
d.
enumeration
Within any class or method, the code between a pair of curly braces is called a(n) ____.
a.
overload
b.
argument
c.
scope
d.
block
D. Block
. A variable comes into existence, or ____, when you declare it.
a.
goes out of scope
b.
comes into scope
c.
overrides scope
d.
is referenced
B
COMES INTO SCOPE
. A method can receive ____ arguments, even if it is defined as needing double arguments.
a.
string
b.
integer
c.
constructor
d.
send
B. INTEGER
A locally declared variable always ____ another variable with the same name elsewhere in the class.
a.
creates
b.
masks
c.
deletes
d.
uses
B. MASKS
HATE THAT WORD
When you ____methods, you risk creating an ambiguous situation—one in which the compiler cannot determine which method to use.
a.
use static variables in
b.
use class variables in
c.
finalize
d.
overload
____ involves using one term to indicate diverse meanings, or writing multiple methods with the same name but with different parameter lists.
a.
Referencing
b.
Overloading
c.
Nesting
d.
Signing
B. Overloading
. A Java variable’s scope level is its ____.
a.
constructor
b.
class method
c.
block
d.
fundamental class
C. BLOCK
You can use ____ arguments to initialize field values, but you can also use arguments for any other purpose.
a.
object
b.
constructor
c.
data
d.
field
B CONSTRUCTOR
If you want all objects to share a single nonchanging value, then the field is static and ______.
a.
end
b.
final
c.
permanent
d.
class
B. FINAL
If a class’s only constructor requires an argument, you must provide an argument for every ____ of the class that you create.
a.
parameter
b.
type
c.
object
d.
method
When you instantiate an object from a class, ____ is reserved for each instance field in the class.
a.
a constructor
b.
a signature
c.
memory
d.
a field name
When an application contains just one version of a method, you can call the method using a(n) ____ of the correct data type.
a.
parameter
b.
scope
c.
output
d.
constructor
A PARAMETER
When you pass a(n) ____, you pass a memory address.
a.
reference
b.
class variable
c.
value
d.
static variable
A. REFERENCE
When an object of one class is a data field within another class, they are related by ____.
a.
extension
b.
scope
c.
composition
d.
is-a
C. Composition
. Another name for a nonstatic member class is a(n) ____.
a.
static member class
b.
inner class
c.
local class
d.
anonymous class
B inner class
A(n) ____ block begins immediately after the method declaration and ends at the end of the method.
a.
inner
b.
outer
c.
nested
d.
overlapped
When calling this() from a constructor, it must be the ____ statement within the constructor.
a.
first
b.
ending
c.
second
d.
indented
A FIRST
. When they have the same name, variables within ____ of a class override the class’s fields.
a.
packages
b.
statements
c.
fields
d.
methods
D. METHODS
It is not necessary to create an instance of the Math class because the constants and methods of the class are ____.
a.
void
b.
final
c.
static
d.
public
C. Static
When you properly ____ a method, you can call it providing different argument lists, and the appropriate version of the method executes.
a.
declare
b.
overload
c.
name
d.
delete
25. ____ variables are variables that are shared by every instantiation of a class.
a.
Integer
b.
Instance
c.
Class
d.
Time
C. Class