Java Polymorphism Fully Explained In 7 Minutes

Ғылым және технология

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

Пікірлер: 423

  • @LitchBeats
    @LitchBeats3 жыл бұрын

    This guy is way too underrated 🔥

  • @electronoob7341

    @electronoob7341

    2 жыл бұрын

    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

    Жыл бұрын

    @@MrSkinkarde You're Finnish, aren't you?

  • @electronoob7341
    @electronoob73412 жыл бұрын

    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

  • @Veer34286

    @Veer34286

    Жыл бұрын

    maybe bc you love dogs and cats

  • @justspacing9031

    @justspacing9031

    9 ай бұрын

    @@michimarz What? Did you even watch the video?

  • @amphousee
    @amphousee25 күн бұрын

    2024 and this is still the best short explaination of polymorphism on KZread.

  • @piotrek7633

    @piotrek7633

    4 күн бұрын

    Maybe theyre wrong

  • @user-nc4ys3fc2x
    @user-nc4ys3fc2x3 жыл бұрын

    Very good videos. You explain things in ways that eliminates confusion and covers all bases.

  • @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

    10 ай бұрын

    @@mmq6525got somethin’ to prove now do we?

  • @EkThaKingMan

    @EkThaKingMan

    7 ай бұрын

    @@mmq6525 bros got gun to his head by boss as we watch

  • @feynthefallen
    @feynthefallen2 ай бұрын

    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.

  • @jimmysmith9462
    @jimmysmith94622 жыл бұрын

    That was such a simple explanation that was being made WAY too complicated in my class. Thank you for putting this stuff out there.

  • @menaaziz27
    @menaaziz272 жыл бұрын

    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

    Жыл бұрын

    @@elizaalwani9200 The object type does.

  • @nolan_villeneuve

    @nolan_villeneuve

    Жыл бұрын

    @@elizaalwani9200 the object type does. BUT the availability of methods is determined by the reference type.

  • @darylbaptie5159
    @darylbaptie51598 ай бұрын

    Thanks John! After hours of trying to find a clear explainaton you wrapped it up in 7 minutes, thanks again!

  • @eetulaakso5374
    @eetulaakso53742 жыл бұрын

    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.

  • @daniaaguila9824
    @daniaaguila98242 жыл бұрын

    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)!

  • @vanshika.singh.1
    @vanshika.singh.12 жыл бұрын

    The fact that this was explained so perfectly and clear and it just clicked so well. Amazing job done!

  • @ainsleys4402
    @ainsleys440211 ай бұрын

    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.

  • @RJones-mx2oi
    @RJones-mx2oi2 жыл бұрын

    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!!!

  • @Molotom
    @Molotom2 жыл бұрын

    Thanks for the video! You're helping a beginner coder in college out quite a bit :)

  • @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!

  • @mrtoast244
    @mrtoast2442 жыл бұрын

    John is so concise in his teaching, my lecturer literally takes two hours to cover the exact same concepts

  • @eternalflames911

    @eternalflames911

    10 ай бұрын

    memento mori

  • @mrtoast244

    @mrtoast244

    10 ай бұрын

    @@eternalflames911 🖤🤍

  • @rizcmt195
    @rizcmt1952 жыл бұрын

    excellent spent 2 hours watching diff videos to understand the concept but you explained way better and way easy from all of them

  • @FukSN
    @FukSN2 жыл бұрын

    Very clear and easy to follow. Thanks John ✌

  • @vaio007
    @vaio0072 жыл бұрын

    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 !!!

  • @NatanStarke
    @NatanStarke2 жыл бұрын

    Long time im out of programming life but seeing this video kinda make me happy remembering some stuff. Also very good explanations!

  • @lisahlee5678
    @lisahlee56782 жыл бұрын

    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

  • @roverojermainemariongilr.2856
    @roverojermainemariongilr.28563 жыл бұрын

    O that's great and I'm learning more on your channel! Thank you for this! Love from the Philippines!

  • @inspiresomeone8565
    @inspiresomeone8565 Жыл бұрын

    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.

  • @cristhianjesus8978
    @cristhianjesus89784 ай бұрын

    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!

  • @xenophage5562
    @xenophage5562 Жыл бұрын

    This was a fantastic explanation that I was able to wrap my head around, bravo good sir!

  • @crawfishmedia
    @crawfishmedia2 жыл бұрын

    I'm in a Java course and wasn't understanding this topic. Now its perfectly clear. THANK YOU!

  • @devangprabhune3591
    @devangprabhune3591 Жыл бұрын

    You're way of explaining is playful and very expressive. ❤️ it

  • @theNorth473
    @theNorth4733 жыл бұрын

    Unbelievably clear. Thank you!

  • @emilyoldson8213
    @emilyoldson82132 жыл бұрын

    Just found you today and am so thankful I did! Thank you!!

  • @stopfbums
    @stopfbums11 ай бұрын

    Wow this is just amazing. Currently studying computer science and you help me so much!

  • @ibrahimaminu4045
    @ibrahimaminu40452 жыл бұрын

    Man how did i only find this channel now great content so easy to understand concepts the way you explained in this video!!

  • @firasjab
    @firasjab2 жыл бұрын

    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.

  • @TheTamaraTami
    @TheTamaraTami2 жыл бұрын

    Very well explained! Thank you John for sharing this

  • @TheRebelMerchant
    @TheRebelMerchant2 жыл бұрын

    excellent video. I am a CIS student this is now starting to all make sense.

  • @zero_n_one3782
    @zero_n_one37822 жыл бұрын

    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.

  • @thezopelo
    @thezopelo6 ай бұрын

    Thank you for the clarification on overloading vs overriding.

  • @protocolcode2703
    @protocolcode27032 жыл бұрын

    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.

  • @sigfigronath
    @sigfigronath2 жыл бұрын

    Thank you, please do for the other 3 java core concepts as well!

  • @stevewilliams4939
    @stevewilliams49392 жыл бұрын

    Thank you for making these videos. You are a great teacher and communicator. Kind regards. 🙂

  • @MyLe-wc5dg
    @MyLe-wc5dg2 жыл бұрын

    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 ☺️☺️

  • @howaboutsomesoyfood
    @howaboutsomesoyfood Жыл бұрын

    straight to the point way of explaining this concept, most others just over-complicate it and are needlessly verbose.

  • @ironbirdstudios
    @ironbirdstudios6 ай бұрын

    i usually never comment on videos, but this guy deserves it all. help me finally end my struggle with CSE 205.

  • @heartoutloud7498
    @heartoutloud7498 Жыл бұрын

    Ur explanations are as clean as ur code John. Thank you

  • @nunya1120
    @nunya11202 жыл бұрын

    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.

  • @arno5405
    @arno54052 жыл бұрын

    Well done my guy. Great video

  • @bioblade87
    @bioblade872 жыл бұрын

    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

  • @tanyashankar1664
    @tanyashankar16642 жыл бұрын

    Hi,John...you made my life so easy..was struggling to understand the polymorphism concept until i found your video...much love from india

  • @littlecatboybuddy
    @littlecatboybuddy2 жыл бұрын

    this was very helpful! Thank you so much, John😀

  • @kathrinm2420
    @kathrinm24205 ай бұрын

    You really are a great explainer, thank you! I also didn't get the concetp at uni

  • @Alibeee87
    @Alibeee872 жыл бұрын

    Thank you for helping me get through my first year as a graduate student!

  • @jaafarshili7869
    @jaafarshili78695 ай бұрын

    Thank you for the content and for being humble, keep it up :' ) Much Love.

  • @WattsnabbAB
    @WattsnabbAB Жыл бұрын

    Thanks!! you doing a great job explaining this!! Really appreciate!!

  • @berthelmantel5043
    @berthelmantel50432 жыл бұрын

    Simple and clear explanation, thanks John!

  • @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!

  • @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

  • @tonymaina7592
    @tonymaina75922 жыл бұрын

    Finally found a video and understood it. Thanks man

  • @Curiousgoogler
    @Curiousgoogler2 ай бұрын

    Thank you sir for making this concept easy to understand.

  • @stvnk1m
    @stvnk1m2 жыл бұрын

    Very helpful! Thanks for sharing!

  • @linkedprosperity
    @linkedprosperity2 жыл бұрын

    So fun with John...geez I have to get his training...makes Java fun.

  • @ilikniram1
    @ilikniram1 Жыл бұрын

    One of the best! thank you brother John :)

  • @pravir_raghu
    @pravir_raghu2 жыл бұрын

    Clear and to the point, great video

  • @juicifer2024
    @juicifer20242 жыл бұрын

    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.

  • @sapir12351
    @sapir123512 жыл бұрын

    Hey really great video, u make it look easy.. thx!

  • @loganwillans4035
    @loganwillans40352 жыл бұрын

    Great job! Very clear explanation.

  • @mdshaifulchowdhury6471
    @mdshaifulchowdhury6471 Жыл бұрын

    Thanks for excellent explanations

  • @NYUCODERS
    @NYUCODERS2 ай бұрын

    He made it Simple. Thank you 😊

  • @prathapkoththigoda9471
    @prathapkoththigoda94712 жыл бұрын

    It was a nightmare to find a video to understand Polymorphism. Thanks a lot.

  • @Raccoon_In_A_Suit
    @Raccoon_In_A_SuitАй бұрын

    Words fall short to convey how helpful this lecture was sir.Thank you ❤❤

  • @Suguru0927
    @Suguru09278 ай бұрын

    Really learn a lot.Thx

  • @neslinkaragoz
    @neslinkaragoz2 жыл бұрын

    this was great! Thank you!

  • @javlontursunov6527
    @javlontursunov65272 жыл бұрын

    Man thank youj, you are doing a great job.

  • @Chrissownu
    @Chrissownu3 ай бұрын

    BRO THANK YOU SO SO MUCH U CHANNEL IS SAVING MY LIFE RIGHT NOW

  • @alanfang7665
    @alanfang76654 ай бұрын

    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.

  • @user-ot2nv4on1p
    @user-ot2nv4on1p5 ай бұрын

    WOW no words would express how useful your videos are 🙏

  • @bemeb41yashsakpal90
    @bemeb41yashsakpal90 Жыл бұрын

    This guy knows the art of teaching, he explained all the concepts in such a smooth way, he makes learning fun & interesting 😇👍

  • @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

  • @7002K
    @7002K2 жыл бұрын

    Awesome now I will never forget about method overriding and overloading

  • @ibrahimghasia1909
    @ibrahimghasia1909 Жыл бұрын

    Realy great explanation with a simple example!

  • @ahmedismail3840
    @ahmedismail3840 Жыл бұрын

    That was sick Well explained

  • @thestationnews6728
    @thestationnews67282 жыл бұрын

    Think you so much for this great explanation.

  • @tadele3947
    @tadele3947 Жыл бұрын

    Very fast and excellent lecture!he suits me!

  • @justgetit5931
    @justgetit59312 жыл бұрын

    Thank You So Much Sir very well Explained.😀 God bless You

  • @verisad3472
    @verisad34722 жыл бұрын

    You're really good at explaining/teaching! If I pass my midterm, I'll owe my grades to you lol

  • @losokos5558
    @losokos55582 жыл бұрын

    This is huge info, THANK YOU!

  • @davidg3594
    @davidg3594 Жыл бұрын

    This was good! Thank you!

  • @kibuulekalembe4726
    @kibuulekalembe47262 жыл бұрын

    very helpful. Understood polymorphism and encapsulation in less than 30 minutes.

  • @nabeelahs9588
    @nabeelahs95882 жыл бұрын

    Love this! Thank you

  • @lamaalsharyan5187
    @lamaalsharyan5187 Жыл бұрын

    you are just amazing tutor!!!! 💻💪🏼

  • @nazirserat1073
    @nazirserat1073 Жыл бұрын

    Very clear explanation thanks a lot

  • @anonymousgamingms2637
    @anonymousgamingms26372 жыл бұрын

    Simplest and best ever explaination

  • @habtamusium8646
    @habtamusium8646 Жыл бұрын

    I got override just at this time . many thanks !

  • @Pawl0solidus
    @Pawl0solidus2 жыл бұрын

    It would be great to bring these concepts to design patterns explanations

  • @crisfurlin
    @crisfurlin3 жыл бұрын

    You're such a good teacher! Thanks!

  • @CodingWithJohn

    @CodingWithJohn

    3 жыл бұрын

    Much appreciated, glad I can help!

  • @surajpatel4073
    @surajpatel4073 Жыл бұрын

    Yo, can u make a video on explanation of Method Overriding in JAVA ,would really love to watch your explaination

  • @youvegotmail9385
    @youvegotmail9385 Жыл бұрын

    My dude is awesome. Would be awesome to work under someone with his knowledge...and humor.

  • @okwuchukwuokwara1522
    @okwuchukwuokwara152224 күн бұрын

    Hi John, you are such an awesome teacher.

  • @user-ub7pf6td7l
    @user-ub7pf6td7l14 күн бұрын

    it was veeeeery hulpful thank u a lot 👏👏👏👏👏👏

  • @rafaeltschurtschenthaler5986
    @rafaeltschurtschenthaler59862 жыл бұрын

    Man you are a savior! Now i finally understand it!

  • @yevhenii8003
    @yevhenii80032 жыл бұрын

    amazing! much appreciated

Келесі