Name TBD (Quiz 2)
________ refers to combining data and code into a single object. - answer
Encapsulation
T/F: Because every class directly or indirectly inherits from the Object class, every class
inherits the Object class's members. - answer True
The ________ key word is used to call a superclass constructor explicitly. - answer
super
If two methods have the same name but different signatures they are ________. -
answer overloaded
A subclass can directly access ________. - answer only public and protected members
of the superclass
T/F: It is not possible for a superclass to call a subclass's method. - answerTrue
What does the following statement do?
double[] array1 = new double[10]; - answerIt will allow valid subscripts in the range of 0
through 9, It declares array1 to be a reference to an array of double values, and It
creates an instance of an array of ten double values
T/F: Because every class directly or indirectly inherits from the Object class, every class
inherits the Object class's members. - answerTrue
When an object is passed as an argument to a method, what is passed into the
method's parameter variable? - answerthe object's memory address
Which key word indicates that a class inherits from another class? - answerextends
Two or more methods in a class may have the same name as long as ________. -
answerthey have different parameter lists
T/F: Inheritance involves a subclass, which is the general class, and a superclass,
which is the specialized class. - answerFalse
Overloading means that multiple methods in the same class ________. - answerhave
the same name but different parameter lists
T/F: Instance methods do not have the key word static in their headers. - answerTrue
________ refers to combining data and code into a single object. - answer
Encapsulation
T/F: Because every class directly or indirectly inherits from the Object class, every class
inherits the Object class's members. - answer True
The ________ key word is used to call a superclass constructor explicitly. - answer
super
If two methods have the same name but different signatures they are ________. -
answer overloaded
A subclass can directly access ________. - answer only public and protected members
of the superclass
T/F: It is not possible for a superclass to call a subclass's method. - answerTrue
What does the following statement do?
double[] array1 = new double[10]; - answerIt will allow valid subscripts in the range of 0
through 9, It declares array1 to be a reference to an array of double values, and It
creates an instance of an array of ten double values
T/F: Because every class directly or indirectly inherits from the Object class, every class
inherits the Object class's members. - answerTrue
When an object is passed as an argument to a method, what is passed into the
method's parameter variable? - answerthe object's memory address
Which key word indicates that a class inherits from another class? - answerextends
Two or more methods in a class may have the same name as long as ________. -
answerthey have different parameter lists
T/F: Inheritance involves a subclass, which is the general class, and a superclass,
which is the specialized class. - answerFalse
Overloading means that multiple methods in the same class ________. - answerhave
the same name but different parameter lists
T/F: Instance methods do not have the key word static in their headers. - answerTrue