πŸ“’ Too many exams? Don’t know which one suits you best? Book Your Free Expert πŸ‘‰ call Now!

  • google app store apple app store
  • βœ–

      Question

      Method overriding is an example of which type of

      polymorphism?
      A Static Polymorphism Correct Answer Incorrect Answer
      B Compile-time Polymorphism Correct Answer Incorrect Answer
      C Ad-hoc Polymorphism Correct Answer Incorrect Answer
      D Runtime Polymorphism Correct Answer Incorrect Answer
      E Parametric Polymorphism Correct Answer Incorrect Answer

      Solution

      Method overriding (a subclass providing a specific implementation for a method that is already defined in its superclass) is resolved at runtime. The actual method called depends on the type of the object, not the type of the reference variable. This is also known as dynamic polymorphism.

      Practice Next
      ask-question