java 4) If a subclass constructor does not explicitly call a superclassconstructor, _ A) The superclass fields
Question:
java
4)
If a subclass constructor does not explicitly call a superclassconstructor,
_
A)
The superclass fields will be set to the default values fortheir data types
B)
Java will automatically call the superclass's defaultconstructor immediately after the code in the subclass'sconstructor executes
C)
It must include the code necessary to initialize the superclassfields
D)
Java will automatically call the superclass's defaultconstructor just before the code in the subclass's constructorexecutes
5)
In the following statement, which is the superclass?
public class ClassA extends ClassB implements ClassC
_
A)
ClassA
B)
ClassB
C)
ClassC
D)
Cannot tell
6)
When one object is a specialized version of another object,there is this type of relationship between them.
_
A)
"contains a"
B)
Direct
C)
"is a"
D)
"has a"
7)
A subclass class can directly access
_
A)
Only protected and private members of the superclass class
B)
All members of the superclass class
C)
Only public and private members of the superclass class
D)
Only public and protected members of the superclass class
Starting Out With Java From Control Structures Through Data Structures
ISBN: 9780133957051
6th Edition
Authors: Tony Gaddis