Kizspy | Question: 25
(Choose 1 answer)
What is the primary purpose of using a superclass and subclass relationship in Java?
A. To restrict access to certain methods or fields.
B. To create multiple instances of a class.
C. To implement multiple inheritance.
D. To achieve code reusability and facilitate polymorphism.
E. To enforce encapsulation.
F. To establish a one-to-one mapping between classes.