How does java achieve run time polymorphism?

Java

1 answer

Answer

1201675

2026-08-12 17:50

+ Follow

Polymorphism is Greek for "many forms". There are two types of polymorphism: static and dynamic. Static polymorphism occurs at compile time and is also known as compile time polymorphism. Dynamic polymorphism occurs at runtime and is also known as runtime polymorphism.

Runtime polymorphism is a primary feature of the object-oriented programming paradigm. We achieve runtime polymorphic behaviour by defining virtual methods in a base class which derived classes can then override in order to provide more specialised implementations. Whenever we invoke one of these methods, the most-specialised override is executed automatically. In other Words, polymorphic objects will behave according to their runtime type even when the runtime type cannot be determined at compile time.

ReportLike(0ShareFavorite

Copyright © 2026 eLLeNow.com All Rights Reserved.