Can you explain polymorphism?



Can you explain polymorphism?..

Answer / Surendra Pal Gangwar

Polymorphism is a feature in Object-Oriented Programming (OOP) that allows objects of different classes to be treated as objects of a common parent class. There are two types of polymorphism: compile-time polymorphism (method overloading and operator overloading) and runtime polymorphism (through inheritance with method overriding).

Is This Answer Correct ?    0 Yes 0 No

Post New Answer

More OOPS Interview Questions

What is the real time example of encapsulation?

1 Answers  


Tell me the scenario,Where we can use interfaces or Abstract class.And What is the difference between interfaces and abstract class?

5 Answers  


What does enum stand for?

1 Answers  


There are 2 empty jars of 5 and 3 liters capacity. And a river is flowing besides. I want to measure 4 liters of wanter using these 2 jars. How do you do this?

4 Answers  


How to call a non virtual function in the derived class by using base class pointer

4 Answers   HCL,


What are the three parts of a simple empty class?

1 Answers  


how many types of notations are in java

1 Answers   National University of Modern Languages (NUML),


monkey starts climbing up a tree 20ft tall,each hour ,it hops 3ft and slips back by 2ft .how much time it wil tak to reach top of the tree?

13 Answers   IonIdea,


What is a macro? And how is a macro same as a template?

4 Answers  


Write a program to compute for numeric grades for a course. The course records are in a file that will serve as the input file. The input file is in exactly the following format: Each line contains a student's first name, then one space, then ten quiz scores all on one line. The quiz scores are in whole number and are separated by one space. Your program will take it input from this file and sends it output to a second file. The data in the output file will be exactly the same as the data in the input file except that there will be one additional number (of type double) at the end of each line. This number will be the average of the student's ten quiz scores. Use at least one function that has file streams as all or some of its arguments.

1 Answers  


What is an object?

14 Answers   HCL,


explain sub-type and sub class? atleast u have differ it into 4 points?

1 Answers   Infosys,


Categories