+ 1
Why do we essentially need polymorphism in java?
I understand what polymorphism is but I could not understand how much useful it could be in practical programming, any suggestions?
2 ответов
+ 2
if you think inheritance is useful then you might know that polymorphism can make inheritance more important if u don't consider it important by itself.
+ 12
It is useful in practical programming, as in: you will use it everyday.
Basically, polymorphism makes you reuse your code, instead of repeating yourself. Search for dry principle on the internet or scan the famous design patterns of the gang of four (some have also been added in the course section) to learn more about it.
You'll see it everywhere when you proceed.
If you have any particular question about polymorphism, just ask.