QuestionQ204

Working with Inheritance

Which two of the following are advantages of polymorphism?

Choose two
  • A Faster code at runtime
  • B More efficient code at runtime
  • C More dynamic code at runtime
  • D More flexible and reusable code
  • E Code that is protected from extension by other classes
Explanation

Polymorphism allows code written against a common interface or base type to invoke behavior appropriate to an object's concrete type at runtime. This supports dynamic behavior and makes software more flexible and reusable by reducing dependence on specific implementations.

Community Discussion

No comments yet. Be the first to start the discussion!