In this video we are talking about polymorphism
— it is important concept of object oriented programming.
— one word in poly which means many and words morphism means behaviour.
— the polymorphism means behaving one action differently in different situation in java.
— two types of polymorphism
— compile time polymorphism and Run time polymorphism
— when you compile the file and you will know what things get executed this behaviour is knows as compile time polymorphism.
— when behaviour decide at run time this is known as run time polymorphism.
— add(int, int) , add(int, int, int) decided at compile time
– class A extends B — A class has add(int, int) and B has add(int,int ) out of this two we can decide which can execute at run time then this is called run time polymorphism example.