Java Super Keyword Tutorial #87

Поділитися
Вставка
  • Опубліковано 26 вер 2024
  • $1,000 OFF ANY Springboard Tech Bootcamps with my code ALEXLEE. See if you qualify for the JOB GUARANTEE! 👉 bit.ly/3HX970h
    The java super keyword is what you use if you want to use a method or variable from a parent class without having to make it. Making an object can be annoying and can make code confusing, so we use the super keyword to refer to the superclass instead of making an object from that class.
    I hope this helps you with the java super keyword :) At first, I had no idea what the super java keyword was...
    I hope you enjoyed java super keyword tutorial! -
    Full Java Tutorial For Beginners Playlist: • Full Java Course by Al...
    Free Tips: bit.ly/3U6HXcb
    Disclosure: The Springboard link provided is linked to my affiliate account & supports the channel.
    ~
    Alex Lee

КОМЕНТАРІ • 240

  • @alexlorenlee
    @alexlorenlee  11 місяців тому +5

    If you’re new to programming but want a career in tech, I HIGHLY RECOMMEND applying to one of Springboard’s online coding bootcamps (use code ALEXLEE for $1,000 off): bit.ly/3HX970h

  • @Somerandomnessvvv
    @Somerandomnessvvv 4 роки тому +170

    when Alex said SKURRRTT, I felt that

  • @randomguy3000
    @randomguy3000 3 роки тому +101

    if you see this, i just want you to know that every time i search for some topic and see you made a video about it, I know I don't need to look anymore.
    you explain PERFECTLY.

  • @bmax5928
    @bmax5928 4 роки тому +149

    u r soooooo underated alex..i love all of ur videos..i even downloaded some of them as references in future :')

  • @poloroadlove
    @poloroadlove 4 роки тому +5

    Alex, thank you for putting time and effort into this channel. Please don't stop! You really are a great teacher (and person)!

  • @duckking7642
    @duckking7642 4 роки тому +12

    Your tutorials are absolutely great! You explain everything and you make a lot of sense than other people. Thank you for making these :D

  • @martinkorduliak2340
    @martinkorduliak2340 3 роки тому +1

    I love you Alex! I have just started the Java Course and lot of things explained in course were unclear for me. Then you come to the scene and save the day ! Thank you!

  • @bensmart2829
    @bensmart2829 4 роки тому +1

    I have gotten to the point where I can't learn Java from anywhere but this channel. Keep up the great tutorials man!

  • @Nejad7
    @Nejad7 3 роки тому +1

    Hey, I'm passing just to say, "Thank you I watched several videos just to understand the super keyword, and they were not clear as they should. Just when I watched your explanation, I understand the whole idea from the first time, it was the easiest one ever. And because of this presentation, I got the concept of "this" keyword. So again, I'm sending you a time-traveling big thank you.

  • @hrishikeshmukherjee8988
    @hrishikeshmukherjee8988 Рік тому +1

    Alex, thank you for putting time and effort into this channel. Please don't stop! You really are a great teacher

  • @itsokamigd8182
    @itsokamigd8182 3 роки тому

    I speak Spanish but I can understand all you say because your pronunciation is so clear, love your videos, I learned so much with it

  • @kelvinlauchunwai6455
    @kelvinlauchunwai6455 2 роки тому +1

    I like your all videos, it is not complicated to me because your explanation is simple, clear and ez comprehend. Even though you have explained it before, but you will repeat it again simply and quickly.

  • @rozbitazaluzie6085
    @rozbitazaluzie6085 4 роки тому +24

    Alex: vroom vroom
    Subtitles: he said ROOM ROOM !!! O_O

  • @torythompson3974
    @torythompson3974 3 роки тому

    Dude... I am an instructor myself and at times I find myself references your videos to students! Your videos are awesome! Thanks for all of the content. Whenever I need to brush up on anything or learn a frustrating topic I immediately think "I wonder what Alex Lee says about this"!

  • @MeredithElizabeth
    @MeredithElizabeth 3 роки тому +1

    I'm a late starter... but at least I started! Making an app for a nonprofit... hopefully it is not trashed. And yay for Korean food! My son started coding at 6yo and maybe he can be a pro like you. Good job on your videos.

  • @mckayhicken2508
    @mckayhicken2508 3 роки тому

    I spent hours on a project for school with no luck, and then got it in about 10 minutes with your help! Thanks!

  • @ВячеславБраун-р2в
    @ВячеславБраун-р2в 4 роки тому

    You have explained the super keyword so well that even a Russian - lvl beginner understands how it works :) Thank you very much.

  • @themartingcastaneda
    @themartingcastaneda 4 роки тому +1

    Hey, I've been watching a lot of tuts on youtube later, and I got to say you are a very good teacher! Thanks so much.

  • @basirobaidi667
    @basirobaidi667 2 роки тому

    Thank you, Alex you are the man, you explain every thing in plain English language and very in a professional way.

  • @brabbelback2757
    @brabbelback2757 4 роки тому

    I have no idea why you have so little views... your videos are absolutely amazing!!!
    Also the Keyboard thud sound man... I’m living for that

  • @sealspable
    @sealspable 4 роки тому

    You are a real instructor you know how to nail this into my hard head thanks

  • @LePwn4Life
    @LePwn4Life 2 роки тому

    Finally, I understood the concept! Man, I was getting so confused. Great explanation, it's been 2 hours trying to skim through articles and videos but none helped.

  • @seancox2911
    @seancox2911 3 роки тому

    Thnx for the clear run down. Doing it on constructors has been a challenge for some assignments

  • @vinaybhat2615
    @vinaybhat2615 3 роки тому +1

    Very nice tutorial Alex!!

  • @ReflexShow
    @ReflexShow 3 роки тому

    You Alex the only one who make me understand Java, all I know today it's all because of you my boi ♥

  • @KJ_XCV
    @KJ_XCV 2 роки тому

    I love that you keep it simple and get straight to the point with easy to understand examples. My attention span can't survive longer videos XD

  • @LeGrandeux
    @LeGrandeux 4 роки тому

    Hey Alex, you're now the number one UA-cam tutorial at my uni.

  • @Sam-pq2pk
    @Sam-pq2pk 8 місяців тому

    all your tutorials are pure gold Alex, thanks!

  • @prasanth.s8696
    @prasanth.s8696 3 роки тому

    you're really the best teacher bro.Most of java concepts i learnt from your videos .

  • @pedrofyury1420
    @pedrofyury1420 2 роки тому +1

    Man you are literally giving me hope to actually pass my programmation class !! Keep on doing those! ❤️

  • @advocatenidhigupta5467
    @advocatenidhigupta5467 4 роки тому +1

    Alex, u are such a ray of light in darkness for me😀, i have a request , can u please make videos in code analysis and debugging.. pls, it will save my job🙏🙏🙏🙏🙏🙏🙏🙏

  • @fatimaalhammadi5153
    @fatimaalhammadi5153 4 роки тому +2

    Thank you Alex for doing this amazing videos ... you really helped me a lot ♥️♥️♥️♥️♥️♥️♥️

  • @extremelyordinary1971
    @extremelyordinary1971 3 роки тому

    This man made Java easy

  • @96SL
    @96SL 3 роки тому +3

    Apparently you don't have to go to college and study to become a teacher to be able to teach, and apparently you don't need years of boring java lectures to learn java either. Damn you do it good, in the future people like you will make colleges go extinct. Thank you!

  • @ansymb324
    @ansymb324 3 роки тому

    I love the simplicity of your explanations.. Keep working man The views are coming soon

  • @aashnak.7528
    @aashnak.7528 4 роки тому +12

    Hey! I'm still sort of confused as to when you would use super(); in constructors. If the Vehicle constructor runs and prints regardless, then what is the point? Like when would using super(); be useful?

    • @ariton2990
      @ariton2990 4 роки тому +14

      if a parent class has a constructor with parameters, child class will have to call parent class constructor with super(); so it can pass the parameters.
      So if parent class has this constructor:
      public ParentClass(int a, int b) {
      // some code
      }
      Child class constructor will have to pass parameters to parent constructor:
      public ChildClass(int a, int b)
      super(a,b);
      }

    • @aashnak.7528
      @aashnak.7528 4 роки тому +2

      Ariton ah ok. That makes a lot more sense... thanks!

  • @Retrosenescent
    @Retrosenescent 4 роки тому +18

    OK so the main takeaway is simply: this refers to the current class, whereas super refers to the parent class. Thanks, that's all I needed to know

  • @omniversal4739
    @omniversal4739 4 роки тому +5

    Believe it or not, thanks to your videos, I learned a lot about Java and got more comfortable with OOP.

  • @neulseo8405
    @neulseo8405 4 роки тому +1

    I love your tutorials and you're such a good teacher. Thank you so much! Keep it going!

  • @essammohamed9729
    @essammohamed9729 3 роки тому +1

    Fantastic and simply

  • @gianniskrinis
    @gianniskrinis 4 роки тому

    I Love you Alex! I learn a lot about java only in 1 month from you!!!

  • @anithasoundararajan385
    @anithasoundararajan385 3 роки тому

    Alex ..you are trying to make others understand better without reading book .ur videos good example for it ..

  • @ThyUnconsyus
    @ThyUnconsyus 4 роки тому

    thanks alex your a good teacher, love your tutorials you really dig deep and give an explanation to the terms of how things work

  • @nobleinexile4296
    @nobleinexile4296 4 роки тому

    Thanks Alex, you've put in some work to create clear tutorials.

  • @nikplaysgames4734
    @nikplaysgames4734 2 роки тому

    This is gonna carry me on my CS test tomorrow

  • @bumpagab
    @bumpagab 3 роки тому

    Thank you Alex. You do a fantastic job. I wish I had found your channel sooner this semester!

  • @MalexPlayz
    @MalexPlayz 4 роки тому

    Man you are great! I can really follow your tutorials and they are straight forward. They help me alot for Uni so thank you. Keep on pushing

  • @yoshiyoshis552
    @yoshiyoshis552 Рік тому

    Thank you so much for all your videos!
    Its only thanks to you that I was able to progress this far in my Java class! = )

  • @kgodishorachuene6110
    @kgodishorachuene6110 2 роки тому

    This guy is the best! Thnx Bro keep doing the good work

  • @lindsaydyjach7787
    @lindsaydyjach7787 4 роки тому +1

    Thank you for existing...I got an exam next week and I don't know shittt

  • @harshasuresh4062
    @harshasuresh4062 2 роки тому

    This was SUPER helpful!! Thank you Alex!

  • @friedchicken5227
    @friedchicken5227 4 роки тому +13

    Ah yes, the lee man himself.
    (By the way, your jokes are actually funny)

  • @573f
    @573f 4 роки тому

    omg i have a java test in 40 minutes and this is soooo helpful.
    thank you

  • @lakshmisaravanan7161
    @lakshmisaravanan7161 4 роки тому

    wow really I like your java tutorial, and I saw another java video but your classes very nice! really I enjoyed & thank you so much for making this

  • @n_su1841
    @n_su1841 3 роки тому

    Thank you Alex, your channel is very useful👍🏼👏🏼👏🏼

  • @noahbernstein4133
    @noahbernstein4133 3 роки тому +1

    THANK YOU SO SO SO SO SO SO SO MUCH

  • @eliaspianomusic
    @eliaspianomusic 2 роки тому

    10:14 oh wow, didn't know, that just by making a new Object of a class with "new", that it will run the constructor! Now everything makes more sense! Thanks a lot!!! :)))

  • @proibi6319
    @proibi6319 Рік тому

    Thank you my brother, helped me a lot!

  • @bperseid
    @bperseid 3 роки тому

    men this explanation is awasome thnks

  • @JonasKeil
    @JonasKeil 3 роки тому

    Great video, love it!

  • @chocoblan4288
    @chocoblan4288 2 роки тому

    nice tutorial. learned alot. thanks

  • @slonbeskonechen8310
    @slonbeskonechen8310 4 роки тому

    The best explanation! No! SUPER explanation!

  • @arkadiuszgrudzien264
    @arkadiuszgrudzien264 3 роки тому

    Very good explanation. Thx

  • @halimh8656
    @halimh8656 3 роки тому

    thank you so much dear alex

  • @saliadel5238
    @saliadel5238 4 роки тому

    Thank you so much alex this video really helped me to understand super keyword keep going👍👍👍

  • @kevinishki
    @kevinishki 2 роки тому

    Better explanation than my professor in an hour

  • @spenceremmanuel7563
    @spenceremmanuel7563 4 роки тому

    All I can say is that GOD BLESS U MAN

  • @123timetosleep
    @123timetosleep 3 роки тому

    Hi, just a suggestion. Maybe you could include that the reason why the printed max speed of 100 from Car is due to overriding that happens. :) super video.

  • @choleyu1168
    @choleyu1168 4 роки тому +63

    My exam is literally in less than 12 hours and I was so confuse when my prof went through the whole OOP thing, so I went on youtube and found you - and now they are finally clicking in my head! THANK YOU! (I even subscribed even though I don't need to take this class after the exam, because you actually make it kind of interesting!)

  • @limamelhadjbrahim528
    @limamelhadjbrahim528 3 роки тому

    thanks Alex . you are the best

  • @DailyDoseLA
    @DailyDoseLA 3 роки тому

    You are soooo goodd man keep up the good work

  • @domnicsparta5956
    @domnicsparta5956 3 роки тому

    Alex my best friend, i like your tutorials

  • @mariamaamir1116
    @mariamaamir1116 Рік тому

    this is extremely helpful

  • @roronoa.j6947
    @roronoa.j6947 2 роки тому

    great work and nice explanation, but can you make a video about tricks and tips for super, like exceptions error and etc ..?

  • @mahmoudahmedrefat9827
    @mahmoudahmedrefat9827 3 роки тому +1

    so i am making an array of objects and want to inhert that array of objects to the other object and work from it could you help me please

  • @nathanengelbrecht7698
    @nathanengelbrecht7698 4 роки тому

    You saved my life thanks man!

  • @hanamohammadabdalla4102
    @hanamohammadabdalla4102 3 роки тому

    thanks for your tutorial ,
    if you could do about Finalize and what is the different between finalizees and Garbage Collection.

  • @rXNDOMMM
    @rXNDOMMM 4 роки тому +3

    Hey alex, great video, just wanted to ask what Computer you use?

  • @johnmarkalejandroramos2050
    @johnmarkalejandroramos2050 2 роки тому

    Using classes, design an address book to keep track of the names, addresses, phone numbers, and birthdays of family members, close friends, and certain business associates. Your program should be able to handle a maximum of 15 entries.
    a. Define the class Address that can store a street address, city, state, and zip code. Use the appropriate methods to print and store the address. Also, use constructors to automatically initialize the data members.
    How can I program this?

  • @ahmedelsafty70
    @ahmedelsafty70 2 роки тому

    I think when you tried writing the main method you had to put static as main must be static otherwise it will give you an error, and the JVM will need to create an object from the main.

  • @yaarrated2382
    @yaarrated2382 2 роки тому

    oh this is just like this.operator. super.operator access to w.e. the operator in the superclass of the current class

  • @ericamuhammad5082
    @ericamuhammad5082 2 роки тому

    Thank you!

  • @oguzhandogan7929
    @oguzhandogan7929 4 роки тому

    YOU ARE GREAT BUDDY!

  • @hi-vk2sm
    @hi-vk2sm 4 роки тому +1

    Hey Alex could you do a JFrame tutorial, I don't understand the syntax and you are a great teacher ,thx

    • @ariton2990
      @ariton2990 4 роки тому

      he already did GUI tutorials. what is that you dont understand.

    • @hi-vk2sm
      @hi-vk2sm 4 роки тому

      Oh he did? Sry I guess I will just watch his video instead. I saw the GUI tutorial on a book and get confused. But as soon as Alex have the tutorial I guess I will figure it out, he's a really good teacher.

  • @nicksmith418
    @nicksmith418 2 роки тому

    What would you did if you wanted to call the Car’s constructor only and not see the output from the Vehicle’s constructor?

  • @adamdreier
    @adamdreier 3 роки тому

    At 8:39 he explicitly states why we use super.

  • @jamesarthur2120
    @jamesarthur2120 4 роки тому

    Please I really enjoy your tutorials. When will you do java intermediate 2?

  • @thatolebethe3238
    @thatolebethe3238 2 роки тому

    thank you for these vids

  • @cinemacat4108
    @cinemacat4108 3 роки тому

    whenever I see one of your videos I immediately click it and I know I don't have to search any more

  • @albinsopaj
    @albinsopaj 4 роки тому

    If you type sout followed by CTRL + Spacebar, then you should get the same result as when you type sysout --> CTRL + spacebar

  • @albinsopaj
    @albinsopaj 4 роки тому

    Java does allow you to create multiple classes in one file, but it won't allow them to be public. Only one of the classes can be declared as public and the other ones declared in the same file (if declared) will have to be without the public access modifier. But usually programmers prefer to use one single class for one single file. So multiple classes are located in multiple files.

  • @gigog27
    @gigog27 4 роки тому +4

    10:20 wait a damn minute! i just realized that java constructors arent typeless methods, but they are nameless methods!

  • @ugiampaolo
    @ugiampaolo 4 роки тому

    ☕️thank you for clear example appreciated it

  • @jamesarden7554
    @jamesarden7554 4 роки тому

    Dear Alex, would it be possible for you to make a video of a small project including some of the things you have taught us so we can see a project from start to finish :) PS you channel is awesome !!!!

  • @Spiritual_Journey_Guru
    @Spiritual_Journey_Guru 2 роки тому

    Quick question at 8:15, What if I wanted to access the vroom() method from the superclass (Vehicle) instead of the subclass(Car) vroom() method without changing the method name? Like you said it priorities the car method, but what if I created a car object but wanted to use the vroom() method from Vehicle, that prints out Vroom vroom?

    • @Leon-uu4wk
      @Leon-uu4wk 2 роки тому

      i maybe late but cant u use overloading concept ?

  • @ohoudhassan221
    @ohoudhassan221 3 роки тому

    Thank you so muchh!

  • @aaryansverma4517
    @aaryansverma4517 2 роки тому

    there is an error at 5:15 which can be fixed just simply make that class public which contain the main method and name the .java file with the same name of the class which contains the main method it'll fix it.

  • @Anaghish
    @Anaghish 3 роки тому

    You're awesome dude, thanks!

  • @johnreypial46
    @johnreypial46 3 роки тому

    Cardi B is shaking from Alex's perfect "SKKUUURT!"

  • @АндрейСидоров-ц3ж
    @АндрейСидоров-ц3ж 4 роки тому

    Hello, could you show in your next video how manage the window in eclipse, and some example with debugging) and also commit in github with eclipse.