Question d’entretien chez DBS Bank

What is polymorphism?

Réponses aux questions d'entretien

Utilisateur anonyme

29 avr. 2017

Ability to take more form under same name..(eg.area(), area(circle))

1

Utilisateur anonyme

12 juil. 2019

It is many forms. In java it can be implemented with overloading or overriding. There are two types 1. Compile time : Overloading a method with in a class with different method signatures. Ex: Bike is a class, based on gear shift no. speed changes. 2. Run time : Overriding a method in different hierarchy classes with same signature it is generally resolved during run time rather than compile time. Generally based on upcasting. Ex. Bank class, different banks provide different rate of interest.