How does polymorphism work?



How does polymorphism work?..

Answer / Gourav Kumar Rastogi

Polymorphism in Object-Oriented Programming (OOP) allows objects of different classes to be treated as if they were instances of a single class. This is achieved through method overloading, where multiple methods have the same name but different parameters, and method overriding, where a subclass provides its own implementation for a method that's already defined in its parent class.

Is This Answer Correct ?    0 Yes 0 No

Post New Answer

More OOPS Interview Questions

Can you inherit a private class?

1 Answers  


advantage and disadvantage in c++>>oops and what are the questions ask for interview in c++>>oops. could you tell me or reply me

0 Answers  


What is and I oop mean?

1 Answers  


What is the correct syntax for inheritance? 1) class aclass : public superclass 2) class aclass inherit superclass 3) class aclass <-superclass

6 Answers   Wipro,


Pls...could any one tell me that whether we can access the public data memeber of a class from another class with in the same program. Awaiting for your response Thanku

4 Answers  


What is sub classing in c++?

1 Answers  


C#.net Interview Question A=10 B=5 C=A+B Print C The above will be given in a multiline textbox. You need to parse the above input, store values for A,B&c. And you have to display the value of C.

1 Answers   Syncfusion,


What is the importance of oop?

1 Answers  


how many types of notations are in java

1 Answers   National University of Modern Languages (NUML),


what is difference between c++ language and java language

5 Answers  


Difference ways of Polymorphism?

3 Answers  


Given two strings like x=?hello? and y=?open?, remove any character from string x which is also used in string y, thus making the result x=?hll?.

13 Answers   IBM,


Categories