Java Polymorphism Fully Explained In 7 Minutes

  Рет қаралды 303,021

Coding with John

Coding with John

Күн бұрын

Complete Java course: codingwithjohn.thinkific.com/...
What does polymorphism mean in Java? So many classes and courses overcomplicate it, but polymorphism is really super simple. We'll talk about what polymorphism means in Java, and go over two different kinds.
Polymorphism is one of the 4 core concepts of Object-oriented programming languages. And it's such a scary sounding word, but it refers to a simple concept.
Learn or improve your Java by watching it being coded live!
Hey, I'm John! I'm a Lead Java Software Engineer and I've been in the programming industry for more than a decade. I love sharing what I've learned over the years in a way that's understandable for all levels of Java developers.
Let me know what else you'd like to see!
Links to any stuff in this description are affiliate links, so if you buy a product through those links I may earn a small commission.
📕 THE best book to learn Java, Effective Java by Joshua Bloch
amzn.to/36AfdUu
📕 One of my favorite programming books, Clean Code by Robert Martin
amzn.to/3GTPVhf
🎧 Or get the audio version of Clean Code for FREE here with an Audible free trial
www.audibletrial.com/johnclean...
🖥️Standing desk brand I use for recording (get a code for $30 off through this link!)
bit.ly/3QPNGko
📹Phone I use for recording:
amzn.to/3HepYJu
🎙️Microphone I use (classy, I know):
amzn.to/3AYGdbz
Donate with PayPal (Thank you so much!)
www.paypal.com/donate/?hosted...
☕Complete Java course:
codingwithjohn.thinkific.com/...
codingwithjohn.com

Пікірлер: 435
@LitchBeats
@LitchBeats 3 жыл бұрын
This guy is way too underrated 🔥
@electronoob7341
@electronoob7341 3 жыл бұрын
Yes!
@MrSkinkarde
@MrSkinkarde 2 жыл бұрын
Boring stuff
@SakkePie
@SakkePie 2 жыл бұрын
@@MrSkinkarde why are you watching if you're not interested 😂
@sauravrajmitra6804
@sauravrajmitra6804 2 жыл бұрын
He was born to teach Java
@turuus5215
@turuus5215 2 жыл бұрын
@@MrSkinkarde You're Finnish, aren't you?
@electronoob7341
@electronoob7341 3 жыл бұрын
My Univ. professor couldn't explain it to me like this over a whole semester! Now here I am understanding it in under 10min. Thank you!
@King-cv6mn
@King-cv6mn 2 жыл бұрын
Perhaps you should have come here first
@michimarz
@michimarz Жыл бұрын
John has some very good videos, but this one is kinda disappointing, I'd say. It's not exactly polymorphism what John is explaining here. It's more like he's only describing inheritance. That said, I think you should have listened more carefully to your Professor instead.
@techatival
@techatival Жыл бұрын
"If you can't explain it simply, you don't understand it well enough." - Albert Einstein
@Pratik_yadaw
@Pratik_yadaw Жыл бұрын
maybe bc you love dogs and cats
@justspacing9031
@justspacing9031 Жыл бұрын
@@michimarz What? Did you even watch the video?
@amphousee
@amphousee 3 ай бұрын
2024 and this is still the best short explaination of polymorphism on KZfaq.
@piotrek7633
@piotrek7633 2 ай бұрын
Maybe theyre wrong
@travismaurice6308
@travismaurice6308 Жыл бұрын
Dude. You really just saved my entire life. I was having so much trouble understanding how to explain polymorphism and putting it into my own words. You explained it so perfectly in so many ways. Great content!
@mmq6525
@mmq6525 Жыл бұрын
lol entire life? a little dramatic aren't we
@smeboo9044
@smeboo9044 Жыл бұрын
@@mmq6525got somethin’ to prove now do we?
@EkThaKingMan
@EkThaKingMan 10 ай бұрын
@@mmq6525 bros got gun to his head by boss as we watch
@user-nc4ys3fc2x
@user-nc4ys3fc2x 3 жыл бұрын
Very good videos. You explain things in ways that eliminates confusion and covers all bases.
@SoundSpaceStation
@SoundSpaceStation Жыл бұрын
I always wonder why University teachers spend whole semester to explain the topic but you still don't understand, but here on you tube you watch 7 minutes video about the topic and fully understand what the heck it is all about . Thank you John very much for your great content!
@eric.m5790
@eric.m5790 Жыл бұрын
University teachers are not programmers. If you want to learn how to swim i think its best to learn from someone that already knows how to swim
@michimarz
@michimarz Жыл бұрын
John has some very good videos, but this one is kinda disappointing, I'd say. It's not exactly polymorphism what John is explaining here. It's more like he's only describing inheritance. That said, I think you should have listened more carefully to your Professor instead.
@JJJJ-gl2uf
@JJJJ-gl2uf Жыл бұрын
Surely your college teachers aren't spending an entire semester explaining one concept to you. Java [programming] doesn't come easily or quickly to everyone, maybe hit the books a bit harder or do what you're doing here: supplement your college lessons with YT videos.
@mrtoast244
@mrtoast244 2 жыл бұрын
John is so concise in his teaching, my lecturer literally takes two hours to cover the exact same concepts
@eternalflames911
@eternalflames911 Жыл бұрын
memento mori
@mrtoast244
@mrtoast244 Жыл бұрын
@@eternalflames911 🖤🤍
@firasjab
@firasjab 2 жыл бұрын
I think what you have described here is simply inheritance & method overloading. Polymorphism is a bit more advanced than that. You could for example have declared the cat and dog objects as Animal. That would at least have introduced the concept of polymorphism.
@feynthefallen
@feynthefallen 5 ай бұрын
It's always nice to see you still got the basics down, even though I think I never EVER went and thought "I'm gonna use polymorphism on that sucker", but just went and did it.
@menaaziz27
@menaaziz27 2 жыл бұрын
Subscribed! with polymorphism also you can always assign a subclass object type to a super class reference type like that Animal cat = new Cat(); Animal dog = new Dog(); Animal a = new Animal(); Since Animal cat = new Cat() | | | | Reference type object type Happy coding everyone.
@MrSelmanceltiker
@MrSelmanceltiker 2 жыл бұрын
Actually this is the correct explanation of polymorphism. The video content explains inheritence mechanics of OOP. Inherıtance provides child class type object act like parent class type object by inheritence. Polimorphism provides parent class type object can act like chıid class type object. Internal mechanics are very different.
@elizaalwani9200
@elizaalwani9200 2 жыл бұрын
So does the reference type or object type determine which method is used
@KaraSuraDraw1
@KaraSuraDraw1 2 жыл бұрын
@@elizaalwani9200 The object type
@brutusjackendy3658
@brutusjackendy3658 2 жыл бұрын
@@elizaalwani9200 The object type does.
@nolan_villeneuve
@nolan_villeneuve 2 жыл бұрын
@@elizaalwani9200 the object type does. BUT the availability of methods is determined by the reference type.
@darylbaptie5159
@darylbaptie5159 10 ай бұрын
Thanks John! After hours of trying to find a clear explainaton you wrapped it up in 7 minutes, thanks again!
@Mobin92
@Mobin92 2 жыл бұрын
You kinda left out the main point of Polymorphism. The conclusion should be that you can store all the different instances (e.g. of Dog, Cat, ...) in Animal variables and it still does the proper thing! Usually you e.g. have a List which contains different animals, and you can just call the eat() function on each element without worrying what type it actually is.
@jimmysmith9462
@jimmysmith9462 2 жыл бұрын
That was such a simple explanation that was being made WAY too complicated in my class. Thank you for putting this stuff out there.
@vanshika.singh.1
@vanshika.singh.1 2 жыл бұрын
The fact that this was explained so perfectly and clear and it just clicked so well. Amazing job done!
@eetulaakso5374
@eetulaakso5374 2 жыл бұрын
Thank you! I'm so happy that I found your video. I definetely watch other content from you, since you explain this topic so clearly. This makes so much more sense even in English compared the videos of my native language in which I just don't understand this subject at all.
@lisahlee5678
@lisahlee5678 3 жыл бұрын
You have no idea how I struggled to understand this, about 5 hours before exam i stumbled upon this video, thank you. It was super easy to understand, never thought someone could explain polymorphism this way
@RJones-mx2oi
@RJones-mx2oi 2 жыл бұрын
I really wish I had found you and your channel months ago. Even though you are speaking fast, I am grasping and retaining the concept to write into code. Thank you so much!!!
@daniaaguila9824
@daniaaguila9824 2 жыл бұрын
Hi John, thanks for your Java tutorials with non-monotone voice. If you can explain more about composition and aggregation in Java that would be great (your explanations are easier to digest compared to other youtube tutorials)!
@ainsleys4402
@ainsleys4402 Жыл бұрын
I don't know how to express my gratitude dude, you've saved me. I've been struggling really hard with my Java class and you have a gift for explaining in a way that scratches my brain the right way.
@Molotom
@Molotom 3 жыл бұрын
Thanks for the video! You're helping a beginner coder in college out quite a bit :)
@NatanStarke
@NatanStarke 2 жыл бұрын
Long time im out of programming life but seeing this video kinda make me happy remembering some stuff. Also very good explanations!
@FukSN
@FukSN 2 жыл бұрын
Very clear and easy to follow. Thanks John ✌
@roverojermainemariongilr.2856
@roverojermainemariongilr.2856 3 жыл бұрын
O that's great and I'm learning more on your channel! Thank you for this! Love from the Philippines!
@rizcmt195
@rizcmt195 3 жыл бұрын
excellent spent 2 hours watching diff videos to understand the concept but you explained way better and way easy from all of them
@ibrahimaminu4045
@ibrahimaminu4045 2 жыл бұрын
Man how did i only find this channel now great content so easy to understand concepts the way you explained in this video!!
@madmalik2776
@madmalik2776 7 күн бұрын
I struggled with understanding polymorphism after reading the entire chapter twice, but I finally grasped the concept after watching this 7-minute video. Thank you so much for the help!
@maniac7591
@maniac7591 Жыл бұрын
Great explanation. I've been trying to study up for an interview (has been years since I graduated and been in a different field so I forgot everything). When I was studying it wasn't clear that method overriding and method overloading were part of Polymorphism. They made it seem like they were totally different things so thank you for clearing it up!
@fallennarcotic6981
@fallennarcotic6981 Жыл бұрын
You have not fully understood a problem if you can not explain it to someone else. This guy is an expert in his field making the explanation affordless
@xenophage5562
@xenophage5562 Жыл бұрын
This was a fantastic explanation that I was able to wrap my head around, bravo good sir!
@vaio007
@vaio007 2 жыл бұрын
The best Java programming youtuber !! Wish I had known his channel back in 2021 beginning when I started the programming module in Uni.. Explains way better than many of my lecturers ! Thank You !!!
@emilyoldson8213
@emilyoldson8213 2 жыл бұрын
Just found you today and am so thankful I did! Thank you!!
@prathapkoththigoda9471
@prathapkoththigoda9471 3 жыл бұрын
It was a nightmare to find a video to understand Polymorphism. Thanks a lot.
@cristhianjesus8978
@cristhianjesus8978 7 ай бұрын
You are an amazing teacher, know that. I've been doing a lot of java courses and these topics are always convoluted and extremely difficult to understand, but you've managed to explain in a simple way. Thanks!
@TheTamaraTami
@TheTamaraTami 2 жыл бұрын
Very well explained! Thank you John for sharing this
@nunya1120
@nunya1120 3 жыл бұрын
Your channel is still very new, but wow, if you keep this up you're going to grow exponentially. Love your content please keep it up.
@lazarus8011
@lazarus8011 Жыл бұрын
Jonny Sins is the best at teaching programming
@devangprabhune3591
@devangprabhune3591 Жыл бұрын
You're way of explaining is playful and very expressive. ❤️ it
@theNorth473
@theNorth473 3 жыл бұрын
Unbelievably clear. Thank you!
@stevewilliams4939
@stevewilliams4939 2 жыл бұрын
Thank you for making these videos. You are a great teacher and communicator. Kind regards. 🙂
@tanyashankar1664
@tanyashankar1664 2 жыл бұрын
Hi,John...you made my life so easy..was struggling to understand the polymorphism concept until i found your video...much love from india
@MyLe-wc5dg
@MyLe-wc5dg 2 жыл бұрын
Heyy thank you for this video. Your pronunciation as well as explanation are really easy to understand for a Vietnamese student like me. Keep uploading more informative video please 🙏 Have a nice day ☺️☺️
@crawfishmedia
@crawfishmedia 2 жыл бұрын
I'm in a Java course and wasn't understanding this topic. Now its perfectly clear. THANK YOU!
@bioblade87
@bioblade87 2 жыл бұрын
awesome video. The code examples really help too! I use method overloads all the time in c# systems class but didn't know it's a result from polymorphism. Thanks
@stopfbums
@stopfbums Жыл бұрын
Wow this is just amazing. Currently studying computer science and you help me so much!
@sigfigronath
@sigfigronath 2 жыл бұрын
Thank you, please do for the other 3 java core concepts as well!
@thezopelo
@thezopelo 9 ай бұрын
Thank you for the clarification on overloading vs overriding.
@ironbirdstudios
@ironbirdstudios 9 ай бұрын
i usually never comment on videos, but this guy deserves it all. help me finally end my struggle with CSE 205.
@zero_n_one3782
@zero_n_one3782 2 жыл бұрын
Thank you for the videos. I have humble request for you to make a clear and understandable videos regarding polymorphism via inheritance and polymorphism via interface and passing an object as argument. Thank you once again for good video.
@WattsnabbAB
@WattsnabbAB Жыл бұрын
Thanks!! you doing a great job explaining this!! Really appreciate!!
@protocolcode2703
@protocolcode2703 3 жыл бұрын
Thank you so much. I was looking at a video at linkedin learning an I was about to quit learning java due to that video. You made it so simple and easy. Thank you from the bottom of heart.
@heartoutloud7498
@heartoutloud7498 2 жыл бұрын
Ur explanations are as clean as ur code John. Thank you
@pravir_raghu
@pravir_raghu 2 жыл бұрын
Clear and to the point, great video
@littlecatboybuddy
@littlecatboybuddy 2 жыл бұрын
this was very helpful! Thank you so much, John😀
@tonymaina7592
@tonymaina7592 3 жыл бұрын
Finally found a video and understood it. Thanks man
@TheRebelMerchant
@TheRebelMerchant 2 жыл бұрын
excellent video. I am a CIS student this is now starting to all make sense.
@howaboutsomesoyfood
@howaboutsomesoyfood Жыл бұрын
straight to the point way of explaining this concept, most others just over-complicate it and are needlessly verbose.
@berthelmantel5043
@berthelmantel5043 2 жыл бұрын
Simple and clear explanation, thanks John!
@loganwillans4035
@loganwillans4035 3 жыл бұрын
Great job! Very clear explanation.
@sapir12351
@sapir12351 2 жыл бұрын
Hey really great video, u make it look easy.. thx!
@kathrinm2420
@kathrinm2420 7 ай бұрын
You really are a great explainer, thank you! I also didn't get the concetp at uni
@ChrisLevi22
@ChrisLevi22 Жыл бұрын
this guy explained a concept in 7 minutes so much better than my professor could in 2 hours. Unreal man. Such a lifesaver
@linkedprosperity
@linkedprosperity 2 жыл бұрын
So fun with John...geez I have to get his training...makes Java fun.
@Alibeee87
@Alibeee87 2 жыл бұрын
Thank you for helping me get through my first year as a graduate student!
@textinface1
@textinface1 Жыл бұрын
Amazing explanation. I'm sure you already know but your teaching skills are helping thousands of students including myself. Thank you so much!
@tadele3947
@tadele3947 Жыл бұрын
Very fast and excellent lecture!he suits me!
@arno5405
@arno5405 3 жыл бұрын
Well done my guy. Great video
@Curiousgoogler
@Curiousgoogler 5 ай бұрын
Thank you sir for making this concept easy to understand.
@stvnk1m
@stvnk1m 2 жыл бұрын
Very helpful! Thanks for sharing!
@jaafarshili7869
@jaafarshili7869 7 ай бұрын
Thank you for the content and for being humble, keep it up :' ) Much Love.
@juicifer2024
@juicifer2024 2 жыл бұрын
Explaining what my comp sci professors couldn't explain during lectures...I do realize you have the benefit of hindsight and editing to make videos go a lot smoother than lectures, and there absolutely is value to lectures since we can actively ask questions and receive answers...But the way you structure your videos has been all but confusing thus far. Love this page.
@agreizda4323
@agreizda4323 2 ай бұрын
I am currently studying for my finals exam in Germany and this is just perfectly explained. THANKS!
@verisad3472
@verisad3472 2 жыл бұрын
You're really good at explaining/teaching! If I pass my midterm, I'll owe my grades to you lol
@Raccoon_In_A_Suit
@Raccoon_In_A_Suit 4 ай бұрын
Words fall short to convey how helpful this lecture was sir.Thank you ❤❤
@nazirserat1073
@nazirserat1073 Жыл бұрын
Very clear explanation thanks a lot
@7002K
@7002K 2 жыл бұрын
Awesome now I will never forget about method overriding and overloading
@alanfang7665
@alanfang7665 7 ай бұрын
Thank you for explaining the topic so well..... I found your material way easier to digest than my java class! Doing God's work out there.
@ar08456
@ar08456 Ай бұрын
this helped me so much!!! thank you
@bemeb41yashsakpal90
@bemeb41yashsakpal90 Жыл бұрын
This guy knows the art of teaching, he explained all the concepts in such a smooth way, he makes learning fun & interesting 😇👍
@mdshaifulchowdhury6471
@mdshaifulchowdhury6471 Жыл бұрын
Thanks for excellent explanations
@aminkt1742
@aminkt1742 2 күн бұрын
simple and best explenation, tnx man
@user-ot2nv4on1p
@user-ot2nv4on1p 8 ай бұрын
WOW no words would express how useful your videos are 🙏
@habtamusium8646
@habtamusium8646 Жыл бұрын
I got override just at this time . many thanks !
@R3Z3R3CT10N
@R3Z3R3CT10N 2 жыл бұрын
Well, enjoyed all the munchs, chomps, and noms while learing something again in a new way. Was grateful this was in my feed/recommendations.
@ibrahimghasia1909
@ibrahimghasia1909 2 жыл бұрын
Realy great explanation with a simple example!
@shankar7435
@shankar7435 Жыл бұрын
I guess what was explained in the video is inheritance. As someone commented " Inherıtance provides child class type object act like parent class type object by inheritance. Polymorphism provides parent class type objects that can act like chıid class type objects. Internal mechanics are very different."
@crisfurlin
@crisfurlin 3 жыл бұрын
You're such a good teacher! Thanks!
@CodingWithJohn
@CodingWithJohn 3 жыл бұрын
Much appreciated, glad I can help!
@jenniferr2033
@jenniferr2033 2 жыл бұрын
Explaining things better than youtubers with 500k+ Subscribers ...John you are doing gods work thank you so much
@increment-
@increment- 6 ай бұрын
2-3 uni lectures in 7 minutes, ur amazing!
@yogeshbhagavatula5197
@yogeshbhagavatula5197 2 жыл бұрын
I hit the like button even before watching. I just know he's gonna clear everything!
@sujitsharma4792
@sujitsharma4792 3 жыл бұрын
Very well explained... It will surely lead to Subscription++
@neslinkaragoz
@neslinkaragoz 2 жыл бұрын
this was great! Thank you!
@kibuulekalembe4726
@kibuulekalembe4726 2 жыл бұрын
very helpful. Understood polymorphism and encapsulation in less than 30 minutes.
@ilikniram1
@ilikniram1 Жыл бұрын
One of the best! thank you brother John :)
@michaelmad9694
@michaelmad9694 3 жыл бұрын
Very helpful!Thanks.
@PremChand-sb3vq
@PremChand-sb3vq Ай бұрын
Wow!!! Extraordinary skills on explaining the concepts🎉
@ahmedismail3840
@ahmedismail3840 Жыл бұрын
That was sick Well explained
@lucifersenpai1948
@lucifersenpai1948 Жыл бұрын
Watching this video i exclaimed three times "Wow! this guy is great". Subscribed.
@losokos5558
@losokos5558 2 жыл бұрын
This is huge info, THANK YOU!
@davidg3594
@davidg3594 Жыл бұрын
This was good! Thank you!
@TheRealFenwick
@TheRealFenwick 3 жыл бұрын
Thank you so much John! you have helped me so much with my internship! Shout-out from Australia
Abstract Classes and Methods in Java Explained in 7 Minutes
7:00
Coding with John
Рет қаралды 497 М.
Array vs. ArrayList in Java Tutorial - What's The Difference?
17:36
Coding with John
Рет қаралды 509 М.
WORLD'S SHORTEST WOMAN
00:58
Stokes Twins
Рет қаралды 122 МЛН
Playing hide and seek with my dog 🐶
00:25
Zach King
Рет қаралды 36 МЛН
Fast and Furious: New Zealand 🚗
00:29
How Ridiculous
Рет қаралды 44 МЛН
ЧУТЬ НЕ УТОНУЛ #shorts
00:27
Паша Осадчий
Рет қаралды 10 МЛН
Fundamental Concepts of Object Oriented Programming
9:16
Computer Science
Рет қаралды 876 М.
Lambda Expressions in Java - Full Simple Tutorial
13:05
Coding with John
Рет қаралды 723 М.
#52 Method Overriding in Java
7:57
Telusko
Рет қаралды 124 М.
Multithreading in Java Explained in 10 Minutes
10:01
Coding with John
Рет қаралды 901 М.
The Flaws of Inheritance
10:01
CodeAesthetic
Рет қаралды 921 М.
PHP doesn't suck (anymore)
10:48
Aaron Francis
Рет қаралды 202 М.
My 10 “Clean” Code Principles (Start These Now)
15:12
Conner Ardman
Рет қаралды 189 М.
Generics In Java - Full Simple Tutorial
17:34
Coding with John
Рет қаралды 1 МЛН
Java Anonymous Inner Classes Explained in 6 Minutes
6:27
Coding with John
Рет қаралды 95 М.
Xiaomi SU-7 Max 2024 - Самый быстрый мобильник
32:11
Клубный сервис
Рет қаралды 544 М.
Частая ошибка геймеров? 😐 Dareu A710X
1:00
Вэйми
Рет қаралды 4,9 МЛН