Java Programming Tutorial - 49 - Inheritance

แชร์
ฝัง
  • เผยแพร่เมื่อ 11 ธ.ค. 2024

ความคิดเห็น • 726

  • @noshowcomedy3400
    @noshowcomedy3400 8 ปีที่แล้ว +369

    this 10 mins video override the 2 - 1 hour and 20 mins session from my CS1351 class

    • @random-0
      @random-0 7 ปีที่แล้ว +1

      lol yea

    • @pkgamma
      @pkgamma 7 ปีที่แล้ว +2

      ay also watching this as a CS student! Taking CS125 at UIUC here HAHA

    • @ItsRawrTopia
      @ItsRawrTopia 6 ปีที่แล้ว +1

      if(video > 9 mins && video < 10 mins)
      {
      System.out.println("what ever NO SHOW Comedy said");
      }
      else...

    • @ATGProntoTV
      @ATGProntoTV 6 ปีที่แล้ว

      You miss @Override

    • @MuhammadBilal-th2yv
      @MuhammadBilal-th2yv 5 ปีที่แล้ว +2

      u are right 45 minute lecture in my college were overrode by this 10 minute video

  • @socstrike7
    @socstrike7 9 ปีที่แล้ว +173

    "make sure you spell some things wrong" hahaha I love this guy

  • @itsbeiko
    @itsbeiko 10 ปีที่แล้ว +714

    i don't know why i pay for my education if free youtube videos explain it x10 better

    • @mangoac
      @mangoac 10 ปีที่แล้ว +33

      * I don't know why I pay for my education when free TH-cam videos explain things 10x better.

    • @MashrufKabir
      @MashrufKabir 10 ปีที่แล้ว +1

      mang oac lol

    • @MashrufKabir
      @MashrufKabir 10 ปีที่แล้ว

      Oh god yeah.. what're the odds hahahah What about you

    • @MashrufKabir
      @MashrufKabir 10 ปีที่แล้ว +1

      Bruh, you're not alone lol...
      You on facebook? Add me up.

    • @cannamason
      @cannamason 10 ปีที่แล้ว +5

      mang oac Good game bro, to bad good grammar didn't get anyone anywhere in programming.

  • @MrEmperor96
    @MrEmperor96 10 ปีที่แล้ว +36

    I swear my computer science prof can't teach anything, all I have learnt is from you.
    He marks really easy though :D

  • @SpringfieldMa
    @SpringfieldMa 11 ปีที่แล้ว +38

    Its 2014 and this still the best layman terms lectures hands down!

  • @CRA1546
    @CRA1546 3 ปีที่แล้ว +1

    typical 10 minute video does better than my 2 hour lecture. cheers.

  • @RaulVargasTeacher
    @RaulVargasTeacher 6 ปีที่แล้ว

    AP Computer Science Teacher here. Thanks for these videos. I share these with my students and they come in handy!

  • @taevy12
    @taevy12 4 ปีที่แล้ว +4

    I watched my professor's video for an hour and learned nothing. You sir explain everything perfectly clear in 6 mins.

  • @loganirons8949
    @loganirons8949 11 ปีที่แล้ว +76

    "Anytime you want to inherit crap from another class..." Lol

  • @ceriwestcott8784
    @ceriwestcott8784 9 ปีที่แล้ว +217

    we spent 4 hours, I kid you not.. 4 hours on inheritance.

    • @MashrufKabir
      @MashrufKabir 9 ปีที่แล้ว

      lol hahahaha

    • @rogernkosi8420
      @rogernkosi8420 8 ปีที่แล้ว +8

      +Ceri Westcott inheritance, polymorphosm

    • @azertyazerty2072
      @azertyazerty2072 5 ปีที่แล้ว +3

      We spent 3hours on how to run on cmd line (2nd video) so yeeah D:

    • @That_One_Guy...
      @That_One_Guy... 4 ปีที่แล้ว +3

      @Misan tropo exactly what deepness ? You just learn Inheritance in this video, you just need to know that Extends is the keyword used for Inheritance (that means allowing subclasses (children) to access superclasses (parents) behavior). I don't think that need to take 3-4 hours to explain.

    • @howellpendragon2227
      @howellpendragon2227 3 ปีที่แล้ว

      Our deadline for this one is till 15... but its hard for me cause we’re only given printed module with limited examples

  • @shoheltube
    @shoheltube 13 ปีที่แล้ว

    Many of my friends who know about extends tried to explain me about its functionality but I was not clear. Your 9.25 minutes make me so clear I hope I will not forget it. Thanks a lot. I will be always with your tutorial. I recommend all beginners to professionals your tutorial to make easy concept. Thanks again and hope you will keep going on.

  • @AlchemicSound
    @AlchemicSound 7 ปีที่แล้ว

    Just saved me 30 pages of reading and explained a 3 hour lecture in less than 10 minutes. Your vidoes (remembered to spell something wrong) are awesome! I am watching all your tutorials and they are all phenomenally helpful!

  • @nuriya9000
    @nuriya9000 6 ปีที่แล้ว

    My lecturer took 4 hours to explain this... You are a life savior

  • @nilemarbarcelos8643
    @nilemarbarcelos8643 12 ปีที่แล้ว

    Guys, instead of using the "private" modifier, you can use the "protected" keyword, so classes from the same package as the superclass and the subclasses of it can access the method "eat"
    try it:
    protected void eat(){...
    Great work with this tutorials, Bucky, thank you from Brazil.

  • @trattanajariya1
    @trattanajariya1 8 ปีที่แล้ว +4

    well this is a lot easier and faster than sitting through class lecture. A+

  • @antoboy99
    @antoboy99 13 ปีที่แล้ว +1

    im doing eclipse and have a test and you are helping me get ready for the test and explaining things better than my actual uni lecturers thank you so much!!!

  • @Distrubutable
    @Distrubutable 11 ปีที่แล้ว +7

    If your having trouble remembering everything but you understand the concepts then take your time to play around. If you rush through the tuts then you won't have time to remember anything. I take a intro to CS class and we do things VERY slowly. But we get a lot of problems and having to work through javax.swing can be challenging at times but you learn by solving problems.
    Test yourself. Maybe, while going through buckys tuts, develop a basic program but build upon every time you learn something(like a calculator or something :) )

    • @triparadox.c
      @triparadox.c 6 ปีที่แล้ว

      Sometimes I feel like I am not capable though.. I don't know whether it is because this is my first time learning this, and I will only just enroll to the college. Sometimes I think I can't make any program..

  • @kuchikishou1o
    @kuchikishou1o 7 ปีที่แล้ว

    Me and mornings don't get along, especially on a Monday morning for OOP class. This is the simplified the version of the lecture that I had just 5 days ago. Thanks man this really help me since whenever I ask my instructor, I'd be given a really complicated answer.

  • @cbox
    @cbox 14 ปีที่แล้ว

    Bucky, you are so awesome that even my professor uses your videos in class. Thanks for helping students like me who are stuck with ineffective teachers

  • @yassershubber6193
    @yassershubber6193 4 ปีที่แล้ว

    it's easy when you implement simple methods and call them, however when dealing with super and sub constructors, there when all the confusion begins, but you explain it way a lot better than set of 1000p books

  • @MrEdwardSP
    @MrEdwardSP 8 ปีที่แล้ว +7

    u make Inheritance much more easy to understand !! thank you

  • @Babelfish112
    @Babelfish112 12 ปีที่แล้ว

    Bucky is a complete expert on explaining things well. My lecturer could never do this. We love you Bucky!

  • @OreoYoo
    @OreoYoo 6 ปีที่แล้ว

    the quick 10 minute vid formats are really good and make it easy to digest. well done

  • @xxlifewirexx
    @xxlifewirexx 14 ปีที่แล้ว

    your 9.24min kicks 2 hrs of lectures! thanks a million!

  • @oscarchivas3123
    @oscarchivas3123 10 ปีที่แล้ว +81

    Adding to this, constructors are never inherited.

    • @dalalalghomlas1600
      @dalalalghomlas1600 10 ปีที่แล้ว +2

      good one!

    • @RaqibZaman
      @RaqibZaman 5 ปีที่แล้ว

      @John Rhaenys Could you give an example in code how "super ()" allows for inheritance?

    • @asyrafsufi4108
      @asyrafsufi4108 5 ปีที่แล้ว +2

      @@RaqibZaman you mean inheriting the superclass constructor right?
      public SubClassName() {
      super();
      }
      just do it like that, correct me if i'm wrong im also new to java

    • @briandacallos4234
      @briandacallos4234 5 ปีที่แล้ว

      @@asyrafsufi4108 but i can enherit the constructor for my super class ?

    • @hayden3774
      @hayden3774 5 ปีที่แล้ว +14

      @@briandacallos4234 The purpose of a constructor is to easily make objects. If you made a super class called Bird and it had instance variables:
      String color;
      int wingspan;
      Then you made the constructor :
      public Bird(String color, int wingspan) {
      this.color = color;
      this.wingspan = wingspan;
      }
      THEN you made a subclass Pigeon extends Bird and you wanted a constructor exactly like your Bird super class, but maybe you wanted to add a diet variable:
      String diet;
      You make the sub class (Pigeon) constructor take on the same values as your super class by adding super() in the new constructor:
      public Pigeon(String color, int wingspan, String diet) {
      super(color, wingspan);
      this.diet = diet;
      }
      You can then make your objects as such:
      If you want just a Bird ---------------> Bird b1 = new Bird("white", 10);
      If you want a Pigeon -----------------> Pigeon p1 = new Pigeon("gray", 11, "bread crumbs");
      You can't inherit the constructor from your super class, but you can incorporate the variables found in that super class into a new constructor with super()

  • @wingold6006
    @wingold6006 9 ปีที่แล้ว +68

    bucky boy i love your tutorials but they make me so hungry.

    • @Celestial21
      @Celestial21 7 ปีที่แล้ว +2

      win Gold tuna Apple chicken lol

  • @predatorBr
    @predatorBr 7 ปีที่แล้ว

    Hey bucky been watching your videos for a long time now. Guys If your watching this I'm majoring in CS and currently in a role that requires great knowledge of programming. When I need to I always come looking for his tuts. Thanks!

  • @uthrasowrirajan7457
    @uthrasowrirajan7457 10 ปีที่แล้ว +2

    You are the best teacher..Thanks a lot.. concepts explained so beautifully..

  • @kareng4120
    @kareng4120 3 ปีที่แล้ว

    Bucky should get an award for being the best programming instructor on planet earth

  • @RalphNgOfficial
    @RalphNgOfficial 10 ปีที่แล้ว +2

    I'm doing my part time Degree in IT, the tutors are sucks, but you are my saviour!
    TQ Bucky

    • @gallegom58
      @gallegom58 10 ปีที่แล้ว +9

      lol youtube > higher education :o

    • @moreno6283
      @moreno6283 10 ปีที่แล้ว

      Michael Gallego same thing in EPFL Switzerland.. GO youtube GO

  • @lborg019
    @lborg019 11 ปีที่แล้ว

    Bucky is the best.
    You have no idea how helpful these tutorials are, thanks a bunch man!

  • @paulinasieminska1656
    @paulinasieminska1656 4 ปีที่แล้ว

    Oh Maaan, Thank you so much, for helping me to understand this very complex Java World

  • @01maku43
    @01maku43 4 ปีที่แล้ว +1

    2 days of lecture explained in 10 mins...
    SALUTE!

  • @yadavshashankkumar
    @yadavshashankkumar 6 ปีที่แล้ว

    9 fuckin years and his course still holds a great value..... awesome lecture

  • @psykodiak5333
    @psykodiak5333 5 ปีที่แล้ว

    10 years later and these videos are still solid.

  • @13thChip
    @13thChip 14 ปีที่แล้ว

    Hats off Coach ! You are better than our Corporate Traininer with 25 years Experience.

  • @davidmax1816
    @davidmax1816 8 ปีที่แล้ว +2

    If you want to teach in TH-cam You should born as a teacher like this guy!

  • @nerdkidleo
    @nerdkidleo 12 ปีที่แล้ว

    hey bucky! i wanna thank you for helping me out in my college studies man..i am the second year and i suck at java but after watching your tutorials...man i feel good! for now...

  • @1kingrule
    @1kingrule 14 ปีที่แล้ว

    I learn more from you than i do in the $1500 Java class I'm currently taking!!!

  • @poongkuzhali
    @poongkuzhali 14 ปีที่แล้ว

    Excellent tutorial. I have watched many java tutorials, but this is the best. Thanks a lot guys for this clear tutorial. I have watched all Ur 87 tutorials, thanks a lot..Keep it up guys

  • @CesarDMarin
    @CesarDMarin 6 ปีที่แล้ว

    Yo man! this is amazing and so are all of your videos for the Java basics, it really made me understand all the nonsense from school! ... you sir are a legend and I have no words to thank you!

  • @xswooshx
    @xswooshx 7 ปีที่แล้ว

    Thanks for the video! I agree with a couple of these posters about formal education trying to overexplain things. I'm in a grad course for beginning OOP using Java and a lot of the textbook chapters, videos ,etc., just seem excessive. I get that they're probably trying to give a full, technical overview of each subject, but I'm usually left with more questions than answers.
    I'm subscribing and will probably check out a LOT more of your videos. Cheers!

  • @jazzninja77
    @jazzninja77 14 ปีที่แล้ว

    Bucky you are a genius!! This tutorial has cleared up sooo many java mysteries. Brilliant!

  • @monicaceja6889
    @monicaceja6889 7 ปีที่แล้ว

    I am so beyond grateful for these videos you make it so easy to understand

  • @sporreking
    @sporreking 13 ปีที่แล้ว

    I was waching a guy who had made a playlist for all buckys awesome vidz and he missed this tutorial!(it has to be the reason that the next tutorial is AWESOME!)!

  • @martindesantiago5262
    @martindesantiago5262 10 ปีที่แล้ว

    you are great in explaining this. and everything else. I look at your tutorial to help me study for my final and exams. thank you.

  • @abdulazizsa2560
    @abdulazizsa2560 7 ปีที่แล้ว

    I don't know what I would with java class without you after God of course
    Thank you ❤️🙏

  • @OjeyonO
    @OjeyonO 12 ปีที่แล้ว

    bucky - you have a real knack for explaining things - too bad my java teacher couldn't explain it this well

  • @rinxalee8885
    @rinxalee8885 4 ปีที่แล้ว

    Now this is a simple yet effective tutorial

  • @Nvbeatz
    @Nvbeatz 14 ปีที่แล้ว

    Great tutorial! Amazing clarity with detail and simplicity - ALL IN ONE little package! Thanks and keep it up!

  • @rogerpangda1612
    @rogerpangda1612 6 ปีที่แล้ว +1

    Yo Man!!! T_T your tutorials really helped me in my prog. project .Even though this tutorial seems old but its GOLDEN.

  • @rajivghundoo5904
    @rajivghundoo5904 7 ปีที่แล้ว

    Great job! You make hard concepts really easy to understand for all levels of programmers!

  • @13ahaa
    @13ahaa 10 ปีที่แล้ว +7

    One left for the GUI! Let the party begin...

  • @iliach4680
    @iliach4680 4 ปีที่แล้ว

    LEGEND explained in simplest words

  • @contexto-doc
    @contexto-doc 11 ปีที่แล้ว +36

    "Make sure you spell a couple things wrong there"

  • @freshly.refrigerated
    @freshly.refrigerated 11 ปีที่แล้ว

    ok, you can extends or also known as inheritance almost anything. You can extends variables as well. Private can be access within the class and protected can be access within the class and all subclasses. That's why we have Protected, private and public :)
    Hope this helps others. :)

  • @rodyabd5355
    @rodyabd5355 7 ปีที่แล้ว

    my teacher took 4 h to teach us this ! and here in just like 10 m and very simple! u should be a Professor rly

  • @KKorn429
    @KKorn429 12 ปีที่แล้ว

    Great video. I am going to get an A in my java programming classes because you teach it so well. Good luck in your endeavors.

  • @johnboy14
    @johnboy14 15 ปีที่แล้ว

    books make this sound so much more complicated than it really is, thanks man.

  • @mightymechb2789
    @mightymechb2789 8 ปีที่แล้ว +8

    8:53 "whenever u wabt to inherit CRAP from another class"----bucky
    looool

  • @and_rayus
    @and_rayus 4 ปีที่แล้ว +6

    "this is the easiest thing in the world"
    my prof: Spends 2 lectures on inheritance

  • @codemage123
    @codemage123 6 ปีที่แล้ว +1

    wow thanks soooo mutch this video helped me so mutch i could have just watched this insted of HOURS of classes

  • @jwiel86
    @jwiel86 11 ปีที่แล้ว

    Thank you for your videos! I don't know what I'd do without them!

  • @GraveRobbertt
    @GraveRobbertt 4 ปีที่แล้ว

    He's back. 2020 is no longer bad.

  • @Chandler890
    @Chandler890 7 ปีที่แล้ว

    Thank you brother for zooming in, knowing brothers watching on phones

  • @kristofbe1
    @kristofbe1 12 ปีที่แล้ว

    I have never seen tuna, apples and potpie go so well together

  • @zSatherz
    @zSatherz 9 ปีที่แล้ว +2

    How could you possibly give such a helpful, easy to understand video a thumbs down?

    • @Celestial21
      @Celestial21 7 ปีที่แล้ว

      zSatherz people were holding their devices upside down, and they thought they pressed the like button

  • @hanasuru
    @hanasuru 13 ปีที่แล้ว

    That was totally clear! There was nothing confusing about this at all! Thanks!

  • @thatgirlwiththatbook2191
    @thatgirlwiththatbook2191 7 ปีที่แล้ว

    You are a life saver. You're making it sound soooo easy.

  • @weaver2609
    @weaver2609 5 ปีที่แล้ว +1

    bruh i swear this man is a god

  • @relentless2917
    @relentless2917 7 ปีที่แล้ว

    "Every single different clath" love it Bucky!

  • @ignacevansande
    @ignacevansande 5 ปีที่แล้ว

    iv been a year in class and not understanding, finally I get it thank you!

  • @roli340
    @roli340 8 ปีที่แล้ว +72

    I am the only one who thinks that his voice is similar to Walter Jr's voice from Breaking Bad?

    • @anishvyas9872
      @anishvyas9872 8 ปีที่แล้ว

      Hahaha

    • @juansierra9946
      @juansierra9946 8 ปีที่แล้ว +2

      Kid, you just changed my life.

    • @anurgaprasad123
      @anurgaprasad123 8 ปีที่แล้ว +2

      sounds more like jesse pinkman when he makes his jokes

    • @krizvnenvy9125
      @krizvnenvy9125 8 ปีที่แล้ว +14

      he may'have inherited the voice from walter Jr.

    • @Capn-Coin
      @Capn-Coin 8 ปีที่แล้ว +1

      I see what you did there! wow... why did I find this so funny...

  • @katerokay6335
    @katerokay6335 7 ปีที่แล้ว

    a very simple n easy to understand tutorial. Apart from that I love the way u say "Potpie"..:)

  • @nicholasbraud1986
    @nicholasbraud1986 8 ปีที่แล้ว

    I love how you don't correct typos haha. Makes me feel better about my dyslexic brain constantly spelled length like this...lenght. I cannot tell you how many times I have done this.

    • @vyuutuube
      @vyuutuube 8 ปีที่แล้ว

      +nicholasbraud1986 what is the lenght of the times you spelled it wrong? :) ;)

  • @TheaDragonSpirit
    @TheaDragonSpirit 12 ปีที่แล้ว

    "So erm... make sure you spell a couple of things wrong there!" Finally someone who teaches people to not be pedantic about spelling. It's so limiting to a artist. :-)

  • @GospodinStanoje
    @GospodinStanoje 9 ปีที่แล้ว +2

    Bucky you are the BEST! Thank you so much for everything :)

  • @Robostate
    @Robostate 9 ปีที่แล้ว +3

    And you can overLOAD methods in the superclass! Put this as a parameter in the food class method:
    public void eat(int x){
    and then call
    tunaObject();
    tunaObject(1);
    and the second one calls the food method instead. Java is pretty nifty!

  • @lukeagex
    @lukeagex 8 ปีที่แล้ว

    That bloody extends keyword, now I finally understand!

  • @dazuza95
    @dazuza95 10 ปีที่แล้ว +2

    Your tutorials always make me hungry :D

  • @ahmermirza
    @ahmermirza 8 ปีที่แล้ว +2

    Thank you so much... seriously i don't know how to thank you!!! God bless you

  • @MrYouMath
    @MrYouMath 13 ปีที่แล้ว +1

    Wow that was buckylicous:D. You really did a great job on explaining inheritance;-). Thank you alot Bucky! And now lets get to video 50 ^^.

  • @swamks69
    @swamks69 11 ปีที่แล้ว

    wow best tutorial so far from Greg...cleared everything up!

  • @RameenFallschirmjager
    @RameenFallschirmjager 6 ปีที่แล้ว

    you are the best instructor ever!

  • @cm_channelyt
    @cm_channelyt 12 ปีที่แล้ว

    I had almost given up on programming until I came across these tutorials. Bucky for president?

  • @markbrian2888
    @markbrian2888 6 ปีที่แล้ว

    you are the best, better than my lecturer 😎😎

  • @phendformyself
    @phendformyself 8 ปีที่แล้ว

    Thank you so much! Your video helped me immensely! It's clear, concise, and easy to follow

  • @thestarinthesky_
    @thestarinthesky_ 5 ปีที่แล้ว

    Thank you teacher. You are by far the best!

  • @derek8482
    @derek8482 5 ปีที่แล้ว

    this is perfect...
    now i simply get it LIKE MAGIC

  • @HugoIetsGaming
    @HugoIetsGaming 9 ปีที่แล้ว +39

    I understand inheritance but when making bigger projects, I don't :/

    • @rogernkosi8420
      @rogernkosi8420 9 ปีที่แล้ว +7

      +TeleTubbie Luver Practice Practice Practice Practice

    • @HugoIetsGaming
      @HugoIetsGaming 9 ปีที่แล้ว +7

      Roger Nkosi I now understand yay :D

    • @rogernkosi8420
      @rogernkosi8420 9 ปีที่แล้ว

      +TeleTubbie Luver Practice helped a lot I guess.

    • @HugoIetsGaming
      @HugoIetsGaming 9 ปีที่แล้ว +1

      Roger Nkosi indeed

    • @rogernkosi8420
      @rogernkosi8420 9 ปีที่แล้ว +2

      It can be a mind f**k especially Polymorphism

  • @fattjoe312
    @fattjoe312 9 ปีที่แล้ว

    thanks man, much better than my class im paying hundreds of dollars for xD

  • @jessekovach901
    @jessekovach901 6 ปีที่แล้ว

    Thank you my friend, simplest tutorial I have ever seen in CS. Definitely earned a sub from me :)

  • @emirje3844
    @emirje3844 9 ปีที่แล้ว

    thanks a lot it help me understands better for my revision before final exam .

  • @krutip15
    @krutip15 14 ปีที่แล้ว

    you are way better than my professor. thank you

  • @阿明-c2l
    @阿明-c2l 6 ปีที่แล้ว

    learnt more from TH-cam than college, and youtube does not charge me 10 grands a year.

  • @fildapil
    @fildapil 13 ปีที่แล้ว

    @whitebenji Yea your right. Protected is visible to extended classes. Also a note. You can make private fields and have a public "getter" method to get each field. e.g. private int x; public int getX(){ return x;}. This means it will be available for all classes.

  • @powerhouse8522
    @powerhouse8522 10 ปีที่แล้ว

    U cleared so much shit up for me then reading this new java book I got. Thx, keep it up man.

  • @8ZZZZZZZD
    @8ZZZZZZZD 11 ปีที่แล้ว

    bout time you clear up the proper use of private. ive been confused for like 30 videos haha

  • @everydaylifeisgood
    @everydaylifeisgood 14 ปีที่แล้ว

    Inheritance is a big part of learning programming

  • @rogerwieand7386
    @rogerwieand7386 11 ปีที่แล้ว

    wow dude, thanks for the vid, you explained this way better than my compsci prof did