Abstract Classes and Methods in Java Explained in 7 Minutes

Поделиться
HTML-код
  • Опубликовано: 9 июн 2024
  • What are abstract classes and methods in Java, and how and why would you use them?
    Also, what's the difference between an abstract class and an interface?
    Abstract classes can seem like a wacky, complicated Java concept, but they're pretty simple. We'll explain them in just a few minutes in this beginner Java tutorial video lesson.
    How do I make an abstract class, or an abstract method? Why would I want to use an abstract class in Java? What makes an abstract class different from an interface?
    Learn or improve your Java by watching it being coded live!
    Hi, 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 learners.
    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

Комментарии • 621

  • @kerwinso
    @kerwinso 2 года назад +1177

    Love that you explicitly ask and answer the question that every beginner would have: "Why would I want to do this?" Five stars.

    • @bodinian
      @bodinian Год назад +8

      agreed

    • @LaGrossePaulik
      @LaGrossePaulik Год назад +20

      Exactly! I understood the concept, but didn't get why and when we should use it... it's like reading a manual of a hammer, but not knowing when I should use one!

    • @dmax7400
      @dmax7400 Год назад +17

      Right?! I think this is why his tutorials/explainations are so good. I am always asking "Why?" or "When?" when learning about these concepts.

    • @junner13
      @junner13 Год назад +1

      Yes, that's why Im always looking for his videos, just for that question

    • @leoMC4384
      @leoMC4384 Год назад +4

      When John starts "Now, you're probably thinking...", you're like "How did he know what I was thinking?" 😅

  • @MrShamrock244
    @MrShamrock244 2 года назад +344

    Been staring at and abstract problem for hours trying to actually understand whats going on. Clarified it in a few minutes perfectly. Thanks Man!

  • @AhmedOmar-uf3gu
    @AhmedOmar-uf3gu 2 года назад +282

    I wanna cry at how good these videos are, your explanation and walkthrough is just flawless. Thanks John I REALLY appreciate the work and content you're putting out here man, seriously appreciate you.

  • @SolidJungle
    @SolidJungle 2 года назад +50

    My god, you were able to explain everything in just a few minutes when it was taking hours for myself to understand. Thank you!

  • @christopherdevadhas3359
    @christopherdevadhas3359 2 года назад +23

    I have never understood the Difference easier in my 6 years of experience. But you Made me understood this in juz 6 mins. A Royal Salute...

  • @tarunsoni6971
    @tarunsoni6971 Год назад +12

    That last part with that almost straight face was so funny, people be binge watching something on netflix and I be binge watching your videos they are so crisp and clear and easy to understand, a bow down to you.

  • @omer4826
    @omer4826 2 года назад +75

    Dude, you truly are amazing. Thank you. I'm an engineering student and you have teached me far more than any of my programming professors have!

    • @7ol35
      @7ol35 2 года назад +6

      Couldn't agree more

  • @JusQuelle
    @JusQuelle 2 года назад +106

    Probably one of the best explanations I've gotten so far about abstraction. I've been so stuck on this concept, but now I have a better understanding on how to tackle my assignment. Thank you!

    • @BlazingStar2001
      @BlazingStar2001 2 года назад +6

      Yeah, sometimes weird examples really helps u understand concept.

    • @mattstyles4283
      @mattstyles4283 2 года назад +2

      Also worth noting that abstraction as a concept is great for making your code maintainable- if you decide later on to use some other implementation, you can switch it out because it implements the same abstract class, and calls on it won't break the rest of your code

  • @mythilikalidasan
    @mythilikalidasan 2 года назад +6

    Got much clearer undertstanding when and where to use Abstract and Interface. I never saw anyone explain this easy and quick. Would be happy to learn more concepts from your videos.

  • @nonoobott8602
    @nonoobott8602 2 года назад +8

    Wow. In just a few mins you clearly explained concepts that weren't clear to me. You're phenomenal. Thanks for this

  • @HS-ef1dd
    @HS-ef1dd 4 месяца назад

    You explain things SO well. I keep turning to your videos instead of class lecture material to really understand these concepts. THANK YOU for doing this - it truly makes all of the difference. Seriously appreciate your videos and what you do.

  • @user-jx5cs1xv5i
    @user-jx5cs1xv5i 2 года назад +17

    You are such a great teacher very simple and clear.

  • @micleh
    @micleh 2 года назад +30

    You really have a knack of explaining seemingly complicated concepts easily. Thanks!

  • @liberospirito7840
    @liberospirito7840 Год назад

    I have seen many video tutorials about Java but none of them like yours could transmit the concepts so well! Thank you sooo much!!!

  • @vasudharana6664
    @vasudharana6664 10 месяцев назад +3

    i have been trying to understand this for the past one hour and this 7 minute video made the concept crystal clear in my head thank you so much :)

  • @victorejiofor8115
    @victorejiofor8115 2 года назад +4

    It can't be explained better than this... you solved my headache in 7 minutes. Thanks so much.

  • @praveenkadambari7394
    @praveenkadambari7394 2 года назад +7

    Wow. What a way to clear up the mess I had on my brain since long time. Now I can make my mind when to use what. Thanks a ton brother..!

  • @Ruveydaa
    @Ruveydaa 7 месяцев назад +1

    Short and clear explanation - that's what a beginner needs. Thank you so much John!

  • @hwane94
    @hwane94 Год назад +1

    seriously this was one of the best java explanation videos I've ever seen. Thank you John!

  • @lucasalledi
    @lucasalledi Год назад +1

    Gotta tell ya, now abstract classes and interfaces are beginning to make sense! Thanks, John! Really appreciate it!

  • @me-wi8vf
    @me-wi8vf 18 дней назад +1

    Thanks a lot for sharing your knowledge.
    I am still learning very important details from you after 20+ years of experience.
    You are one of the best teachers out there on java.
    Hats off to you sir.

  • @TheBluePhoenix008
    @TheBluePhoenix008 3 месяца назад +1

    This made me understand everything that's been missing from my course for the past 2 years. It'll help me greatly, thanks!

  • @Sylarleft
    @Sylarleft 8 месяцев назад

    This channel is such a bliss. Great content, and no useless wanderings on unrelated topics.

  • @RefaatIbrahimXIT
    @RefaatIbrahimXIT Месяц назад +1

    Hello John
    Abstract Class is a flexible dynamic Interface and I can say it is a CONTRACT Statement that we NEED and Must enforce the client to apply for example.
    Thank you so much for your clear video.
    Allah bless you.
    Regards

  • @8PrinsAli8
    @8PrinsAli8 2 года назад +5

    The tempo/pace of your uploads are really optimal. You keep it on point without getting into bunch of sidetracks. Those times I've wanted to quickly understand a topic and chose one of your videos, I've never felt restless because of slow talking or too much information and yet got a good understanding of the topic. Keep it up!

    • @barathiraiyarul4498
      @barathiraiyarul4498 3 месяца назад

      I Felt the exact same thing. I just wasn't sure how to express it and you are on point 💯

  • @mahodaadikari4116
    @mahodaadikari4116 2 года назад +3

    Thanks john. I was doubtful about this for years. Your crystal clear explanation made me understand this properly today ❤💯.

  • @christianalejandroflores8501
    @christianalejandroflores8501 Год назад

    amazing videos!! clear and easy explanation!! with code examples!!
    I always have struggled with this concepts
    thank you!!

  • @swado_2000
    @swado_2000 2 года назад

    Keep making these short videos really refreshes concepts and I don’t need to go back searching for things now.

  • @Dima-wd4cf
    @Dima-wd4cf 10 месяцев назад +1

    that's the best explanation i've ever seen on this topic

  • @erdemorhan2403
    @erdemorhan2403 Год назад

    The best and simplest explanation I've ever seen. Thank you.

  • @humanperson1418
    @humanperson1418 2 года назад +2

    Thanks for clarifying this! Best video on the subject that I can find!

  • @valerietremblay3235
    @valerietremblay3235 2 года назад

    THANK YOU so much!! All your videos so far are simple & precise.

  • @jackng9918
    @jackng9918 5 месяцев назад +1

    This 7 minutes video is much better than the long 2 hours lecture
    Really appreciate your comunnication skills and ur effort devoted on this video

  • @tinkerer3954
    @tinkerer3954 2 года назад

    there's so many java tutorial but this is truly a gold mine

  • @BabuncinaJones
    @BabuncinaJones Месяц назад

    John I am learning java and I am on an intermediate level but your videos always help. I wanted to make sure the things I knew about interfaces and abstract classes were right and now I'm sure more than ever. Thank you

  • @johntravolta2655
    @johntravolta2655 2 года назад +2

    Another coment.
    Tbh i have never seen a better programming chanel in my whole live.
    Explenations are always on point, I always get it straight away. We appreciate your work :)

  • @hafsasifeddine9198
    @hafsasifeddine9198 8 месяцев назад

    I can't believe that it has been 2yrs allready since u made this thank u so much ❤

  • @nick-yr7wu
    @nick-yr7wu 2 года назад +1

    Thanks you for taking the time and effort to make these tutorials!

  • @poojasahajan2656
    @poojasahajan2656 10 месяцев назад +1

    This was the best explanation I got for the difference between interfaces and abstract classes!! Really grateful for your amazing work!

  • @mariap11315
    @mariap11315 Год назад

    Thanks John! I love your memorable examples and well explained "why"s, way easier to grasp these topics!

  • @valoriebroderick
    @valoriebroderick 2 года назад

    Much clearer than other videos. Thanks!

  • @valeriobottinelli8433
    @valeriobottinelli8433 6 месяцев назад

    it took you 7 minutes including an introduction for the same content my teacher talked for hours( and I still wasn't sure what the hello was going on). Awesome, now I understand. Thank you.

  • @FukSN
    @FukSN 2 года назад +1

    Well explained and super easy to follow.
    Thanks John.

  • @Udestocome
    @Udestocome 3 месяца назад

    Really clear explanation, nailed it. Thank you!

  • @SY27196
    @SY27196 2 года назад

    I was looking for learning Java
    This channel is like God sent !
    Bless you !

  • @fatimaalzhramohamed9471
    @fatimaalzhramohamed9471 Год назад

    Amazing. Finally understood the concept behind all that

  • @vertergaminghd399
    @vertergaminghd399 7 месяцев назад

    Something I often dislike about coding tutorials is that the obvious questions of why and how aren't addressed or beat around the bush on. Thank you for explicitly stating and answering all the doubts I had in mind. Appreciate it :)

  • @feeetus4067
    @feeetus4067 Год назад +2

    When a 6min video is more efficient than an hour class of abstraction and interfaces 🙌 earned a sub brother appreciate the finals help 🙏

  • @yourlinuxguy
    @yourlinuxguy Год назад

    Really Clean and Precise keep up the good work.

  • @jaecheokkim99
    @jaecheokkim99 2 года назад +1

    Really clear explanation about differences between abstract and interface. Thank you!

  • @chocolate_Almonds
    @chocolate_Almonds 11 месяцев назад

    I loved how "easy" this was to process in my brain compared to hours upon hours of attempts to get it in my head during college. Thank you!

  • @saronabi1387
    @saronabi1387 Год назад

    was confused in the class about this abstract and interface, now super clear! thank you so much

  • @sakshamswarup186
    @sakshamswarup186 4 месяца назад

    Love it. I've been having a bit of trouble wrapping my head around this concept. Thanks a bunch!

  • @pedjadjape1
    @pedjadjape1 Месяц назад

    Hey man, amazing video ! Exactly what I was looking for!
    I was looking for abstract class vs interface , and this was exactly that. Even though you didn't mention "interface" in your video's title. Consider doing that maybe. YOUR EXAMPLES ARE REAALLY GREAT ! Carefully chosen to explain the core diferences. I don't recall anybody explained that better. I don't usually write comments on youtube, but you deserved it, my man!

  • @wil1285
    @wil1285 Год назад

    I've been looking for this explanation years. Now that I am learning backend stuff this concept is clear thanks to you.

  • @chriskwon5212
    @chriskwon5212 Год назад

    This video is the easiest to understand and also conveys the most information at the same time. Great video.

  • @CannigiaLaluw
    @CannigiaLaluw 2 года назад

    I just watched a bunch of videos on this topic, but everything clicked for me after watching yours. Thank you!

  • @yuvaraje3734
    @yuvaraje3734 Год назад

    Very well thought. Watched many videos but got the exact explanation about the difference in your video. Thanks a lot

  • @elonmusk3845
    @elonmusk3845 6 месяцев назад

    wow i really love how you explained the difference between a class and interface, really made it a lot simpler to understand compared to my current course in school, big thanks!

  • @saurabhs009
    @saurabhs009 2 года назад +9

    This video is beautiful.. Please make a whole series on java programming and frameworks, it would have some of the less privileged ones to actually learn and do something on their own. Thanks :)

  • @InSterquiliniisInvenitur
    @InSterquiliniisInvenitur 2 года назад

    This was a great explanation. Short but still getting all the important points in. Thank you!

  • @mohamedlegtibi802
    @mohamedlegtibi802 Год назад +1

    Finally I'm able to understand the difference. Thank you John for your explanation. Greetings from Morocco

  • @eprice000
    @eprice000 Год назад

    Absolutely fantastic. This example will help shape your understanding of Abstract methods and Interfaces, how to implement an abstract method, the differences between abstract classes and interface, and it was all done in 7:00 minutes. Very clear, very easy to understand. Thank you!

  • @keshavrajacharya1145
    @keshavrajacharya1145 11 месяцев назад

    Very short clear and satisfactory explanation

  • @jlee8615
    @jlee8615 7 месяцев назад

    Crystal clear explanation!

  • @obsessedwithJBJ
    @obsessedwithJBJ Год назад +1

    Thanks! This really cleared it up in my head, I was struggling to figure out why we would want to!

  • @alexcultrera3820
    @alexcultrera3820 Месяц назад

    👏 Yes! Great explanation of this topic, John! Thank you

  • @HomelessOnline
    @HomelessOnline 2 года назад

    I just wanted to shout and rant angrily but actually that was the best explanation in 7 minutes. Clear and concise, thank you.

  • @nikoladojcinovic1030
    @nikoladojcinovic1030 2 года назад

    Simple, yet excellent explanation. Thanks!

  • @nayankumar9113
    @nayankumar9113 7 месяцев назад +1

    no better way to explain it. Thank you so much John, highly appreciated.

  • @ayshaa3685
    @ayshaa3685 Год назад

    Amazing, clear, and straight to point!

  • @aeon7748
    @aeon7748 Год назад +1

    You are among the best teachers on RUclips, good job and thank you for your lessons! ❤

  • @sindhupanneerselvam4087
    @sindhupanneerselvam4087 Год назад

    Needed clarification on whats the actual purpose of using an abstract class .Really simple and clear explanation for a beginner like me to follow . Thank you John !!

  • @SuperPali666
    @SuperPali666 9 месяцев назад

    This is perfectly explained, no wasted time. Top notch. Thank you !

  • @chidambaramvalliappan9069
    @chidambaramvalliappan9069 2 года назад

    Superb Explanation. Easily understandable.

  • @suwatchainanchai6637
    @suwatchainanchai6637 2 года назад +1

    Thank you so muck for your lesson. I have stucked in a concept of abstract for so long. so now on I will consider using an abstract class in my project.

  • @mgcezz2154
    @mgcezz2154 Год назад

    I have downloaded this video, I will listen to it at home i'm at work right now. This sounds amazing. thanks

  • @theq18
    @theq18 4 месяца назад

    Very clear and awesome explanation. I like you always tell the reason for these concepts

  • @daiyrkanybekov8575
    @daiyrkanybekov8575 2 года назад +1

    Great video bro. Appreciate this kind of tutorials. Keep it going. Hello from Kyrgyzstan 🇰🇬🇰🇬🇰🇬

  • @vivu8181
    @vivu8181 Год назад

    Thank you John so much, I have sit in a 4 hour long lecture for these stuff but could not understand. With your explanation in 7 minutes, I totally get it. I wish the best for your channel. you have very practical example. I like it.

  • @brysonrivera7026
    @brysonrivera7026 Год назад

    Great video. I was going to look up interfaces next but you saved me an extra video.

  • @josephwu6240
    @josephwu6240 6 месяцев назад

    Thanks for the clear explanation.

  • @AGriffith
    @AGriffith 2 года назад +1

    What an awesome explanation my friend, this is why I always think there is a lot of gold free content on internet, you just gotta find it

  • @unikris94
    @unikris94 2 года назад

    Thanks for it! I immediately understood

  • @benjamingiosis4880
    @benjamingiosis4880 2 года назад

    man - this dude explain in 5 minutes what my lecturer has been trying to do for 50, cheers!

  • @NguyenHieu-sm2ql
    @NguyenHieu-sm2ql 2 года назад

    Thank you John, the Great Explainer.

  • @pabloaristimuno9447
    @pabloaristimuno9447 2 года назад

    I allways wathc spanish videos for programming, but in this case i'm amazed by your explainning form. Thanks for all your videos and for sharing all your knowlege in an easy way to understand.
    Greetings from Argentina!

  • @SingerDuoScreens
    @SingerDuoScreens 6 месяцев назад

    I have seen multiple videos on this topic and all of them were badly explained and confusing. Now I watched yours, and I am impressed how well you can explain stuff. Thank you.

  • @lenkadan11
    @lenkadan11 11 месяцев назад

    The final 2 minutes totally helped me get the whole concept, thanks for enlightening me :)

  • @nirishae8779
    @nirishae8779 7 месяцев назад

    This video is so clear and easy to understand, thank you!

  • @rohitrranu1
    @rohitrranu1 Год назад

    Thanks for explaining and helping.

  • @krystall0000
    @krystall0000 11 месяцев назад

    Thanks for the video. All the explanation of the all methods and classes are crystal clear and smooth.

  • @deimanteadeikiene4153
    @deimanteadeikiene4153 2 года назад +10

    I can feel the effort that was put into this video :)

  • @FiZiXiRL
    @FiZiXiRL Год назад

    Thankyou so much for helping me study for my java programming final exam !
    Your ability to go into further detail and give extra examples as you did when mentioning interfaces is always brilliant.

  • @barathiraiyarul4498
    @barathiraiyarul4498 3 месяца назад

    I just found this guy and Oh my he is a Gem. His videos undoubtedly have the best, most precise, crisp information anyone will ever need. I spent hours trying to learn abstraction and polymorphism, while he did it in just 7 + 7 minutes. Can't stop stressing on how good his content is 💯

  • @syougowatanabe1716
    @syougowatanabe1716 5 месяцев назад

    This class is absolutely nothing but clear and easy to understand .Thanks master!! From Japan who aim at being top level engineer in the future!!

  • @avabruner4686
    @avabruner4686 7 месяцев назад

    john i just want to seriously say thank you for saving me. my professor is so unclear, on top of a thick accent, and i struggle in the course due to those combined. i cannot say thank you enough

  • @MC-hr5hm
    @MC-hr5hm 10 месяцев назад

    Brilliant explanation John!

  • @2012mindmaster
    @2012mindmaster 2 года назад

    You seriously deserve more subscribers, your content is gold, I wish it existed when I was a student. Kudos

  • @wscatao
    @wscatao 8 месяцев назад

    That tutorial was soooo gooood , i saved in my playlist. Thanks John!!!!