The following are answers to the questions in the first mock exam. Each question may have more than one correct answer. Each of the questions also shows which exam topic it relates to.
Question 1 (7.1. Describe inheritance and its benefits)
The keyword extends can be used
A. to create a subclass from another class
B. to create a subinterface from another interface
C. to make a class implement an interface
D. to make an interface implement another interface
Answer: A, B.
The keyword extends can be used to create a child class from another class or a subinterface from another interface. C is incorrect because extends cannot be used to make a class implement an interface. For this, you use the keyword implements ...