What is polymorphism ? Explain with examples
Answer Posted / khushpreet kaur.
Polymorphism is taken from the greek word which means "many
forms"...
So polymorphism means "to carry out operations of
different processing steps by function having same
messages".
when a base class member function can be overridden by
defining a derived class member function with same name as
that of the base class member function,then such type of
concept is called "Polymorphism".(one interface multiple
methods)
polymorphism is of two types- compile time(early or static
binding) and run time(dynamic or late binding)..
in comlite time is of two types-function overloading and
operator overloading.
in run time is of two types-virtual function and pure
virtual function..
| Is This Answer Correct ? | 11 Yes | 0 No |
Post New Answer View All Answers
What are the 3 principles of oop?
What is interface in oop?
What are constructors in oop?
What is use of overloading?
What is inheritance and how many types of inheritance?
How to hide the base class functionality in Inheritance?
What is oops and why we use oops?
Which is better struts or spring?
What is a function in oop?
class CTest { public: void someMethod() { int nCount = 0; cout << "This is some method --> " << nCount; } }; int main() { CTest *pctest; pctest->someMethod(); return 0; } It will executes the someMethod() and displays the value too. how is it possible with our creating memory for the class . i think iam not creating object for the class. Thanks in Advance... Prakash
What is oops and its features?
What do you mean by overloading?
write string class as your own class in java without using any built-in function
What is abstraction oop?
What makes a language oop?