Computer Science, asked by Anonymous, 4 months ago

With the help of an example explain the concept of polymorphism. .​

Answers

Answered by ayonapretty02
4

Answer:

An important example of polymorphism is how a parent class refers to a child class object. In fact, any object that satisfies more than one IS-A relationship is polymorphic in nature. For instance, let's consider a class Animal and let Cat be a subclass of Animal . So, any cat IS animal.

hope it helps plz rate the answer

Answered by HappyBhadana
3

Answer:

Hope it will help you..

The word ‘polymorphism’ literally means ‘a state of having many shapes’ or ‘the capacity to take on different forms’. When applied to object-oriented programming languages like Java, it describes a language’s ability to process objects of various types and classes through a single, uniform interface.

Polymorphism in Java has two types: Compile time polymorphism (static binding) and Runtime polymorphism (dynamic binding). Method overloading is an example of static polymorphism, while method overriding is an example of dynamic polymorphism.

An important example of polymorphism is how a parent class refers to a child class object.  In fact, any object that satisfies more than one IS-A relationship is polymorphic in nature.

#HappyBhadana

Follow me for instant answers..

Thanks !

Similar questions