Polymorphism in Java
Polymorphism is a not java related concept but this is object oriented concept; which programming language support these concept like, polymorphism, inheritance, encapsulation, abstraction etc known as object oriented programming language.Polymorphism in Java is most important feature; using this feature you can use same method name in base and derived class both, this concept also known as method overriding.
Real Life Example of Polymorphism
The real life example of Polymorphism is;Suppose you have girl friend, when see in market at that time she behave link customer, if she with you behave like your girl friend, if she in own home at time time she behave like doughtier. Same concept is apply in case of Polymorphism.
Polymorphism is derived from two greek word poly and morphs, poly means many and morphs means forms.
No comments:
Post a Comment