What is polymorphism in programming

preview_player
Показать описание
---------------------------
Things can change in programming - hence polymorphism!
Рекомендации по теме
Комментарии
Автор

THE ONLY ONE WHO IS CLEAR ENOUGH FOR MY GENIUS MONKEY BRAIN - THANK YOU

xephyr
Автор

ok but you're missing the essence and you're kinda mixing stuff with inheritance here..
The basis of polym is not that you have multiple copies of your function in each type that inherits form Animal( that's inheritance), but rather that you have a method pet(Animal a) in another class, and any object of a type that inherits from class Animal will be suitable for that method. ( they key point here is that you can only have the class Animal and pet method and classes that are still not existent can comply to the pet's method signature by inheriting from Animal).

Polymorphism can be achieved through interfaces, abstract classes, or regular (concrete) classes, but the essence remains the same: treating objects of different types in a uniform way.

In the broader context, polymorphism is about writing code that can work with objects of different types in a unified manner. Whether you achieve this through interfaces, abstract classes, or regular classes with inheritance, the goal is to create more flexible and reusable code that can accommodate various types of objects without knowing their specific implementations.

drakulea
Автор

Would be good to go into the other types of polymorphism, not just overloading

TVIDS
Автор

Thank you very much. I was having trouble with it until now.

JSamuel
Автор

Such a nice series - all of it, just top. Explanation, duration, your voice is so smooth.
Just amazing, thank you

annmarryp.k.
Автор

So, overloading functions is a type of polymorphism ?

kittyissu
Автор

After watching this I clearly understand that concept.

oystar
Автор

I was already using it and didn't know what it meant, exactly. Tks for the video!

NewGroundBreaker
Автор

I never wanted the video to end before for the first time I was getting something about polymorphism

hafsabatool
Автор

Thanks a bunch. This is the perfect overview that I have been looking for! Now I get it at a high level.

HaileeMiu
Автор

Extremely simplistic and helpful, thank you kind sir.

JamesJSwiftJay
Автор

simple and effective explanation. Thank you.

MtnOrange
Автор

THANK YOU THANK YOU THANK YOU OMFG...WHY CANT EVERYONE EXPLAIN IT LIKE YOU!!!! SERIOUSLY I DOWN VOTED AND CRITIQUED EVERY SINGLE VIDEO ON YOUTUBE ABOUT THIS UNTIL I CAME TO YOURS THANK YOU 👍🙏🙏🙏🙏

ViceKnIghtTA
Автор

I didnt even know I was already doing polymorphism

bambinot
Автор

I wish I could give you 1000 likes lol. You made this so easy to understand!

LOLcheeseORZ
Автор

NICE I'VE GOT LIKE ONE BRAINM CELL AND MY ASSIGNMENT IS DUE IN 8 HOURS AND I AM ON SO MUCH CAAAFINE

jossieyan
Автор

hey man keep it up! your doing so good

pating
Автор

Please talk faster. I watched your video in 2x speed and it was still way to slow. Great explanation tho.

JordanVickers-nu
Автор

Polymorphism occurs at run time or debug time or compile time?

digitalchetan
Автор

Would it be safe to say this is like a case statement, logic never changes but argument is whatever you want it to be?

illmatic