What is polymorphism?
When you override methods, JVM determines the proper methods to call at the program’s run time, not at the compile time. Overriding occurs when a class method has the same name and signature as a method in parent class. Overloading occurs when several methods have same names with
· Different method signature and different number/type of parameters.
· Same method signature but different number of parameters.
· Same method signature and same number of parameters but of different type
int add(int a,int b)
float add(float a,int b)
float add(int a ,float b
void add(float a)
int add(int a)
void add(int a) //error conflict with the method int add(int a)