Polymorphism depicts the ability where a method can have various behaviors entirely depending upon the object type where it is called or its type for which is passed as a parameter. for example, if a user has to define their own class "MyInteger" and a method "add" for the same following code has to be typed to bring it in functioning.
BY Best Interview Question ON 17 Oct 2019

Example

Basically to add certain integer along with another number we would follow through-

MyInteger int1 = new MyInteger(5);
MyInteger int2 = new MyInteger(7);
MyFloat float1 = new MyFloat(3.14);
MyDouble doub1 = new MyDouble(2.71);
print(int1.add(int2));
print(int1.add(float1));
print(int1.add(doub1));