Member-only story

Polymorphism in OOPS

Devrim Ozcay
2 min readNov 12, 2022

Hello, How are you? I hope you are fine. In this article, I have processed polymorphism. I hope it will be fun. I hope life will always be fun. In order to achieve a success, people want to find the way to success fun. If you dream of the happiness that success brings, believe that the path to that success will always be fun for you.

We often see examples of polymorphism in real life. The best example of this is this. A man can act both as a father, as a husband and as an employee, such a person can have many characteristics and display these characteristics in different ways, that is, in different situations. Another example is when a girl can be both hypocritical and nice. In some cases it hits you from behind. In some cases, it seems fine to you. It is an example of polymorphism in daily life that a person provides other characteristics with the same person, namely himself, in some cases.

An example of polymorphism in software is the relationship between subclasses that derive from a main class and take the properties of that class. In fact, it may act like inheritance, but inheritance is this: Inheritance is when a subclass makes use of the properties and behaviors of the superclass, while polymorphism is called deriving different classes from this main class and that classes have different properties. Let’s take an example.

--

--

No responses yet