Question: 1. Assuming that class B inherits from class A , which of the following is correct? a. An object of class A is an object

1. Assuming that class B inherits from class A, which of the following is correct?

a. An object of class A is an object of class B

b. None of these is correct.

c. An object of class B is an object of class A.

2. What keyword do we use in the class header that inherits from an interface?

a. implements

b. interfaces

c. modifies

3. Why does Java provide a protected access modifier?

a. To hide methods from the client classes

b. All of these are correct.

c. To hide fields from client classes

4. Why would you want to override a method?

a. It allows you to hide features of the subclass using the super keyword.

b. It allows you to hide features of the superclass that you want to change.

c. It allows you to invoke the base case method.

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock 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 Databases Questions!