4.7: Introduction to Polymorphism - The Nature of Code
Vložit
- čas přidán 1. 08. 2015
- This video looks at the topic of polymorphism in object-oriented programming.
Read along: natureofcode.com/book/chapter-...
github.com/shiffman/The-Natur...
Help us caption & translate this video!
amara.org/v/QbwE/
📄 Code of Conduct: github.com/CodingTrain/Code-o...
In 8 minutes I understood what I could not understand with my teacher in 2 hours.
Thank you so much
Right! People like him I would be happy to take a loan out and pay for this amazing teaching.
Same here :D!
School is not really teaching people to be smart.Its to create industrial age employees.
They taught people in a one way learning style and dislikes creative diverse ways of learning.
So dammn true.. i read several tutorial on internet about this inheritance stuff..but they cant help me to understand clearly..but it only takes minutes to understand when i watch this
yeah a lot of teachers in CS are fucking useless. Dan actually understands teaching well
Y'all this guy is teaching with such enthusiasm, he gets my respect. 💯 Keep up the good work!
This is my first lecture to click on and I have to say, this guy is amazing. The level of enthusiasm he has is incredibly contagious.
This is why I love youtube. Understood in a couple of minutes what a I couldn't understand on a 3h long lecture.
Thanks a lot!!!!!
What does it tell you about your intellectual skills?
Best code teacher I could ever find.
I am so happy to be here.
Thanks so much for this, this was one of those concepts where I understood the theory but couldn't understand why I would use it or why it was so important. Your enthusiasm is infectious :)
Effeciently and effectively explained - extra credit for the passion. You've earned a new sub
Man, thank you so much for the great tutorial, I love the way you explain as well as the energy you put into you videos, learning from you a lot! Keep rocking!
So Simple! Wow After a year and a half I got it! Dan's videos are really great to watch. I am learning Java but they translate to any language at a certain level.
Just want to let you know that your explanation is very good with great and clear examples. I'd love to see more abstract concepts being explained by you too, like using abstract class in concrete class in OOP designs, invariant and variant, observer vs observable, event-driven design, etc.
This is my best tutorial on Polymorphism
YES SIR! You're amazing, appreciate the enthusiastic, relatable way you lay it down. I am so much more confident about Java.
finally an insightful understanding of polym...
I feel as many people don't grasp the essence of polymorphism and they just see that polymorphism is child classes overiding methods from parents or interfaces, but in reality they are truly missing the point .. which is to create more flexible and reusable code that can accommodate various types of objects. so the power is the fact that you can lets say have a method pet(Animal a) in any other class and any object of a type that inhertis from Animal would be propper argument for that method.
After watching so many videos finally, he explains it beautifully. Thanks.
really cool concept is this polymorphism. and your explanation of this and inheritance was so exceptional. now i finally understand them thoroughly.
congrats on your role in casa de papel, you did a great job
Hahaha I thought the same!
Really great. This video is short, efficient, and very effectively communicates the concept. You got another subscriber.
You are by far the best code teacher!
I absolutely love your enthusiasm! Very enjoyable to watch
I know I'm a bit late, hope you see this but this was really fun to watch and helped me make a lot of connections of content I knew but couldn't put together until you burst onto the screen with an enthusiasm that students dream of, thankyou!
Great video! It was an easy enough beginning to be understandable by pretty much anyone with a programming-afluent mind and towards the end difficult enough to explain polymorphism in actual practice such that a person who doesn't know what polymorphism is, can pick up this principle and run with it to any heights they want to take it - whether that be just one extension of a class or many and usage in complex scenarios with all 3 principles of OOP playing a role.
It's funny you say that. I'm not "required" to watch your video, but it is a requirement for my studies to understand object oriented programming in abstraction, inheritance, polymorphism, and encapsulation; but you teach very well, and I understand it. I'm glad you're doing what you're doing.
This guy teaches me more than a university teacher, and does it with such a goddamn passion. Thanks man!!
congrats to 200k subscribers!
Best video that explain polymorphism. Easy example to follow on the whiteboard, easier to follow this than someone trying to explain it in their way on the computer. Me, I knew what it was before going on this video, but had a hard time explaining it well in an easy way, even though it isn't a hard topic in itself. Maybe I'm just dumb.
Much love!
YOUR ENERGY IS CONTAGIOUS AND I LOVE IT. thank you!
This guy's enthusiasm is addictive.
Love the energy you put while teaching, makes it much more interesting! Thank you!!
Thank you!
Thank you very much!! I really like your teaching style. You're like a ray of sunshine!
"I'll edit that out", always :)
it's like a running joke among creators these days. ;p
great teaching style. dynamic, fun and clear af.
Thank you so much for this video, I finally understand what Polymorphism means now!
omg three textbooks and like five videos and i couldn't understand polymorphism but this video FINALLY helped me understand it, thank you!!!
Extremely happy I came across this video.
simply amazing , your explications are fantastic !
Absolutely the best video about polymorphism out there!
third polymorphism video, finally got it. Thanks!
:) very good exempl its very helpful for inderstanding polymorphism ,thanks very mutch ,
How i wish you are my teacher. I actually understand you under 8 min and i cannot under my lecturer for the past few months.
Wow, thanks for this, 6yrs down and this is still valid
truly thank you for this amazing explanation
Daniel, you are very very good at what you do. a life of meaning and purpose. I envy you Sir!
Wow, awesome explanation mate!
Thanks you, it was very helpful to know what is Polymorphism
You give me hope that this world is still livable
Thanks a lot, that was easy to follow and understand from the first minute.
Thanks for the vid! This was very helpful. Great jumping off point for Polymorphism! (btw, watched the vids on inheritance first; best way to go).
This is literally the best video on polymorphism in java
Man you are incredible....... how do you do this!?!?
your videos made my day 💖💖
beautifully explained. Thank you!
First time saw your video. Couldn't do much just subscribed.. Awesome.
Amazing Job man Coherent communication .. salute
1000 new subscribers every day. Great channel
Awesome. You're a great teacher. :)
Previous episode: 12,000 views
This episode: 100,000 views
Makes sense.
Finally understand polymorphism..!! 😍😍👏👏 Thank u sooo much sir for making this video.. ♥️
Wow!! You simply save my day.. ♥
This video was amazing!!! Thank you so much!!!
You are an awesome teacher! Thank you!
You explained polymorphism way better in 8 minutes than my Java teacher did in 2 hours.
awesome, just awesome, thanks a ton for the tutorial 👌👌👌👌👍🙂🙂
Such a nice tutorial!!!
Awesome explanation
I really enjoyed your video!!thank you so much!!
kidd Ba correct
Videos 8 and 9 seem to be set as private in this Nature of Code playlist.
best explanation ever , thanks
Amazing explanation
El Professor whats up. Excited for season 4!
Wow it's so nice sir!!!
This helps a lot, thanks! 😁
Very nice job, thank you so much!!
It is the best video on this topic
Wow thanks. You made me understand what polymorphism is which my teacher couldn’t
What an explanation !!!! sir
thank you very much
This guy is so incredibly passionete, so good!
I wish you taught me programming when I first developed the interest
Respect to you, understood everything.
Simply Awesome!
Extremely fantastic 😀 thank you very much 😃
I love his excitement
yasss. Finally a FUN java lesson.
That was fun to look.
Love you Dan.
Happy Teacher, helloo! good to see ya! :D
so interesting good teaching skill halalalaa
well done, sir.
I wish I could be happy like you
I so wish you where my teacher right now.
good video!
Thnx for logic !
Very Nice ... I'm THIS CLOSE to dub you in Brazilian Portuguese
can i write
for (Dog d : Kingdom) {
d.sleep()
}
?
in order to only loop through the dogs.
I think this would work but, it would only put the dog to sleep not other animals.
I love this guy
HOLY MARY MOTHER OF CHRIST THANK YOUUUU
I have a question. If suppose I add another method into the dog class, which is an extended version of the animals class but this method does not exist in the basic animals class. I want to run that method in the same loop for (animals a: kingdom). I am assuming that is not possible.!
+Ranjan Nayyar It's possible but you would need to check if the object is a Dog object or not and then cast it as a Dog object. Something like if (obj.getClass().getName() == "Dog").
can you not also do if( a instanceOf Dog){ execute method defined in dog class} ?
Awesome. Thank's.
And what if dog.eat(), cat.sleep(), If I loop thru vector, then I want only dog to eat, and cat do nothing. Do cat will be also not called from vector? Or it will be, but function of eat() for cat will not exist, and class cat will return just 0, from base class?
I don't understand after 6.30. What is that class?
Wow I wish this guy knew everything in the world so he could teach me.
What are the other situations that polymorphism is useful?