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
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
Step by Step Solution
3.49 Rating (156 Votes )
There are 3 Steps involved in it
Step: 1
Answer 4 B Java will automatically call the superclasss default constructor immediately ...Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started