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

1 Expert Approved Answer
Step: 1 Unlock

Answer 4 B Java will automatically call the superclasss default constructor immediately ... View full answer

blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Programming Questions!