Java Programming Tutorial - 49 - Inheritance

Поделиться
HTML-код
  • Опубликовано: 27 ноя 2024

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

  • @noshowcomedy3400
    @noshowcomedy3400 8 лет назад +370

    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

  • @itsbeiko
    @itsbeiko 10 лет назад +715

    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 RUclips 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.

  • @socstrike7
    @socstrike7 9 лет назад +174

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

  • @SpringfieldMa
    @SpringfieldMa 11 лет назад +39

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

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

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

  • @CRA1546
    @CRA1546 3 года назад +1

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

  • @ceriwestcott8784
    @ceriwestcott8784 9 лет назад +218

    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.

  • @nuriya9000
    @nuriya9000 6 лет назад

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

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

  • @loganirons8949
    @loganirons8949 11 лет назад +76

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

  • @trattanajariya1
    @trattanajariya1 7 лет назад +4

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

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

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

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

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

  • @wingold6006
    @wingold6006 9 лет назад +69

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

    • @Celestial21
      @Celestial21 7 лет назад +2

      win Gold tuna Apple chicken lol

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

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

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

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

  • @lborg019
    @lborg019 11 лет назад

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

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

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

  • @kareng4120
    @kareng4120 3 года назад

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

  • @uthrasowrirajan7457
    @uthrasowrirajan7457 10 лет назад +2

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

  • @paulinasieminska1656
    @paulinasieminska1656 4 года назад

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

  • @jazzninja77
    @jazzninja77 14 лет назад

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

  • @1kingrule
    @1kingrule 14 лет назад

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

  • @monicaceja6889
    @monicaceja6889 7 лет назад

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

  • @13thChip
    @13thChip 14 лет назад

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

  • @OjeyonO
    @OjeyonO 12 лет назад

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

  • @13ahaa
    @13ahaa 10 лет назад +7

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

  • @01maku43
    @01maku43 4 года назад +1

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

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

  • @mightymechb2789
    @mightymechb2789 8 лет назад +8

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

  • @rajivghundoo5904
    @rajivghundoo5904 7 лет назад

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

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

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

  • @contexto-doc
    @contexto-doc 10 лет назад +36

    "Make sure you spell a couple things wrong there"

  • @Chandler890
    @Chandler890 7 лет назад

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

  • @Nvbeatz
    @Nvbeatz 14 лет назад

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

  • @cm_channelyt
    @cm_channelyt 12 лет назад

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

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

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

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

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

  • @kristofbe1
    @kristofbe1 12 лет назад

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

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

  • @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. :-)

  • @davidmax1816
    @davidmax1816 8 лет назад +2

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

  • @abdulazizsa2560
    @abdulazizsa2560 7 лет назад

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

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

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

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

  • @and_rayus
    @and_rayus 4 года назад +6

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

  • @rinxalee8885
    @rinxalee8885 4 года назад

    Now this is a simple yet effective tutorial

  • @johnboy14
    @johnboy14 15 лет назад

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

  • @ignacevansande
    @ignacevansande 5 лет назад

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

  • @GraveRobbertt
    @GraveRobbertt 4 года назад

    He's back. 2020 is no longer bad.

  • @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. :)

  • @iliach4680
    @iliach4680 4 года назад

    LEGEND explained in simplest words

  • @thatgirlwiththatbook2191
    @thatgirlwiththatbook2191 7 лет назад

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

  • @MrYouMath
    @MrYouMath 12 лет назад +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 ^^.

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

  • @relentless2917
    @relentless2917 7 лет назад

    "Every single different clath" love it Bucky!

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

  • @jwiel86
    @jwiel86 11 лет назад

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

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

  • @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? :) ;)

  • @hanasuru
    @hanasuru 13 лет назад

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

  • @GospodinStanoje
    @GospodinStanoje 9 лет назад +2

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

  • @dazuza95
    @dazuza95 10 лет назад +2

    Your tutorials always make me hungry :D

  • @katerokay6335
    @katerokay6335 7 лет назад

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

  • @ahmermirza
    @ahmermirza 8 лет назад +2

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

  • @lukeagex
    @lukeagex 8 лет назад

    That bloody extends keyword, now I finally understand!

  • @8ZZZZZZZD
    @8ZZZZZZZD 11 лет назад

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

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

  • @jessekovach901
    @jessekovach901 6 лет назад

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

  • @swamks69
    @swamks69 11 лет назад

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

  • @phendformyself
    @phendformyself 8 лет назад

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

  • @阿明-c2l
    @阿明-c2l 6 лет назад

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

  • @weaver2609
    @weaver2609 5 лет назад +1

    bruh i swear this man is a god

  • @prvnpn216
    @prvnpn216 14 лет назад

    amzing how you teach stuffs in 10 min that our professors are not able to in 1 hour

  • @fattjoe312
    @fattjoe312 9 лет назад

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

  • @markbrian2888
    @markbrian2888 6 лет назад

    you are the best, better than my lecturer 😎😎

  • @powerhouse8522
    @powerhouse8522 10 лет назад

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

  • @emirje3844
    @emirje3844 9 лет назад

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

  • @derek8482
    @derek8482 5 лет назад

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

  • @RameenFallschirmjager
    @RameenFallschirmjager 6 лет назад

    you are the best instructor ever!

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

  • @thestarinthesky_
    @thestarinthesky_ 5 лет назад

    Thank you teacher. You are by far the best!

  • @Teaster
    @Teaster 12 лет назад

    Bloody hell on a biscuit, you teach better than my instructor.

  • @rogerwieand7386
    @rogerwieand7386 11 лет назад

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

  • @nitinkamath3161
    @nitinkamath3161 6 лет назад

    Note this:
    A subclass inherits all the members (fields, methods, and nested classes) from its superclass. Constructors are not members, so they are not inherited by subclasses, but the constructor of the superclass can be invoked from the subclass.