Java super keyword 🦸‍♂️

Поділитися
Вставка

КОМЕНТАРІ • 196

  • @BroCodez
    @BroCodez  3 роки тому +71

    //********************************************
    public class Main {
    public static void main(String[] args) {

    // super = keyword refers to the superclass (parent) of an object
    // very similar to the "this" keyword

    Hero hero1 = new Hero("Batman",42,"$$$");
    Hero hero2 = new Hero("Superman",43,"everything");

    System.out.println(hero2.toString());

    }
    }
    //********************************************
    public class Person {
    String name;
    int age;

    Person(String name,int age){
    this.name = name;
    this.age = age;
    }

    public String toString() {
    return this.name + "
    " + this.age + "
    ";
    }

    }//********************************************
    public class Hero extends Person{
    String power;

    Hero(String name,int age,String power){
    super(name,age);
    this.power = power;
    }

    public String toString() {
    return super.toString()+this.power;
    }
    }//********************************************

    • @G0DsLion
      @G0DsLion 2 роки тому +3

      Bro, you helped me so much that i canot say in words how thankful iam , God bless you.

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

      @@G0DsLion hm...

  • @baubaudinamo
    @baubaudinamo 3 роки тому +105

    this was Super() easy to understand

  • @reynaldojrcapilitan943
    @reynaldojrcapilitan943 3 роки тому +33

    More power to you man.
    I watched a lot of tutorials but yours really exceeded everyone.
    The way you explain is so easy to understand!

  • @professionalaveragekid
    @professionalaveragekid 4 дні тому

    probably one of the most comprehensive java tutorials, without cutting corners :D

  • @Khadheeja
    @Khadheeja 2 місяці тому +1

    Awesome Stuff

  • @Emir-yo8ek
    @Emir-yo8ek 7 місяців тому +2

    I just love how you repeat previous topics by explaining the code in a certain order. Thx bro, greetings from Turkey

  • @furiouspuzza7080
    @furiouspuzza7080 3 роки тому +21

    I'm surprised that this channel only has 2.53k subs, it's "super" underrated

  • @firepower01
    @firepower01 2 роки тому +5

    Your videos are getting me through university dude. Thank you so much for making these tutorials.

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

    superb vid. very powerful presentation

  • @husein_alfil
    @husein_alfil 3 роки тому +15

    This is the best UA-cam Channel for teaching how to Code on UA-cam !
    Keep going and you will surely reach the 1 Million soon !
    Thank you for the great way in explaining !

  • @pavelkvasnicka6856
    @pavelkvasnicka6856 Рік тому +2

    This is the best Java tutorial for beginners, so you can learn Java and English in one hit. Please keep going! I vote for Java advance tutorial. Thanks a lot Bro

  • @thang.d2382
    @thang.d2382 2 роки тому +2

    Your video is short, but it's informative. That's all we need. Many thanks

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

    this actually deserves more likes unfortunately people dont do this often :(

  • @lukashenrique4295
    @lukashenrique4295 10 місяців тому

    great stuff!! I've gone through a year and a half in college, we never had Java, but after I switched to another college (years later), they're having Java there and it's been a pain because of the virtual environment.
    maybe my plugin in the IDE can't handle saving the file multiple times to adjust something because it always tells me it couldn't delete one of the temp files, and in the terminal it works the way it did before the alterations I've done so it's like I'm running the older version of that file.
    then I restart the computer to make the temp files forcibly get removed whenever I can't build the project and it works, all of the alterations are applied.

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

    Really helpful content👍🏻

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

    really enjoying your tutorial

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

    The best channel to learn and get started with a new programming language . Thanks bro

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

    Great Lecture

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

    One of the best youtube channel helps me a lot in learning coding.

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

    Thank you, finally I understand what is super keyword for!

  • @AlirezaR5
    @AlirezaR5 7 місяців тому

    Awesome

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

    elegant simple and awesome! thank you!

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

    Best java course I've found, by far

  • @JackNonsence
    @JackNonsence 3 місяці тому +1

    Bro is much better than my professor.

  • @user-dm2go7us4j
    @user-dm2go7us4j 4 місяці тому

    thank you
    after 4 hour long lesson in school, you made it clearer in 3 videos of -10 min
    thank you

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

    you are really a java server i have understood more than i ever imagined

  • @tekengaged2230
    @tekengaged2230 14 днів тому

    Excellent Video!!!

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

    Amazing😀😀😀

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

    Super duper

  • @Tarnovgrad
    @Tarnovgrad 5 місяців тому

    You show very good examples and explain it very well!

  • @praveenbalajikalla-ng6mx
    @praveenbalajikalla-ng6mx 3 місяці тому

    woww

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

    Thanks for the example, very clear.

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

    brooooo, thank you so much for this tutorial. only after seeing this did I understand how to properly use the keywords - super and this.

  • @lanak.6886
    @lanak.6886 Рік тому +1

    these 10 min thought me more than the 2 hour lecture in university lol thx bro

  • @afaqulhassan5399
    @afaqulhassan5399 6 місяців тому

    Besttttt

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

    Great! 👍

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

    Well explained, Thanks a lot

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

    it is very clear explanation

  • @user-wg5rd6rl11fgt
    @user-wg5rd6rl11fgt Рік тому

    Best❤

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

    amazing

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

    We got lots of tech channel of Indian Teachers, but your teaching method is on point Thanks for creating all this stuff Bro

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

    Cool lesson. Thanks.

  • @DeepakKumar-dw1re
    @DeepakKumar-dw1re 2 роки тому

    Super

  • @MrNb-xu7jl
    @MrNb-xu7jl Рік тому

    yeeeehhhh finnaly i understood what it meansssss. bro you are the bestttt

  • @user-ci9om8vi9f
    @user-ci9om8vi9f Рік тому

    great

  • @danny.3036
    @danny.3036 3 роки тому

    Thanks, Bro! ☕ You're awesome!

  • @Jason-lu5wr
    @Jason-lu5wr Рік тому

    When the class is an extension of the parent class, if an object is instantiated within the child class does that mean the variables/objects that were extended are separate from the variables/objects of the original parent class? (Sorry if that was worded poorly as I'm still new to this)

  • @derjenicheoffiziell
    @derjenicheoffiziell 3 роки тому +3

    Hey Bro, I just shared your channel on r/learnprogramming, hopefully it'll help you in your heroic defiance of the almighty algorithm :)

    • @BroCodez
      @BroCodez  3 роки тому +3

      Taylo you are AWESOME. I appreciate the share. I hate to admit it, but I could use all the help I can get. thanks again.

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

      @@BroCodez No problem man, you definitely deserve more exposure

  • @yigitalkan2916
    @yigitalkan2916 6 місяців тому

    HEYY BROS This guy is great Greetings from Bern

  • @DrinkableWater
    @DrinkableWater 3 роки тому +2

    Finally i know what super is doing :D thanks

    • @BroCodez
      @BroCodez  3 роки тому +3

      Yeah all it does is refer to an object's super class

  • @orlandohunter2785
    @orlandohunter2785 3 роки тому +3

    The prayers did worked, the algorithm brought me here. :)

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

    thanks for the video

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

    NIce.

  • @avi-ish8669
    @avi-ish8669 4 місяці тому

    super

  • @JashanSingh-ve7yx
    @JashanSingh-ve7yx 3 роки тому

    Good

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

    Getting lessons from gigachad. Bruv this is bussin

  • @EyBossPusi
    @EyBossPusi 2 місяці тому

    Thank you for this

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

    Best, as always :)

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

    Amazing

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

    YOU ARE A LEGEND!!

  • @johndavis29209
    @johndavis29209 11 місяців тому

    Dude i love you so much.

  • @sabermmirza
    @sabermmirza 10 місяців тому

    your geniuse

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

    You're the best

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

    Well done! :-)

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

    Super basically equals Parent. Good to know!

  • @user-cd9lg4rt8t
    @user-cd9lg4rt8t Рік тому

    KING

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

    Thank you Bro you’re always be our super()hero💪😆

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

    Hey bro a simple question, why extend a class to use its functionality when we can simply make its object and do the same?

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

    Thank you so much sir.

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

    Frankys reaction after this video: "suuuuupeeer()";

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

    Is the toString method in Hero considered an Overriding method? Since it's using the original method from its super class so I'm not sure.

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

    I have a question related to overriding of the toString method in Hero class, is it necessary?

  • @ghettoslick2000
    @ghettoslick2000 7 місяців тому

    Thanks Bro

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

    thx) it was super!

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

    Thanks bro

  • @noisyguest5249
    @noisyguest5249 3 роки тому +3

    I never knew "super" keyword even existed

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

    thankyou sir

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

    thanks bro

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

    I m the 1000th like of this video xD

  • @HAITIANGPT
    @HAITIANGPT 3 місяці тому

    Thank you Bro!!!!!!!!!!!!!!!!!!!

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

    explained it better than my prof

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

    Thanks!!!

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

    Hey Bro, what is more acceptable to use: System.out.println(hero2) or System.out.println(hero2.toString())? Since both prints the same output.

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

      just put hero2, i use intellij and it says that it's a redundant string call and it's useless, toString means to convert the memory value/data into a readable string, which was already done in the other classes

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

    Thanks Bro!

  • @user-zq6yx7of5f
    @user-zq6yx7of5f Рік тому

    Thank you very much

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

    Superman is your favorite hero right?? Yeah I find BAtman lame too ! Thats why you printed 'hero2' attributes when you also had 'hero1' ! 😉😄 NIce turorial bdw..... So far loving the simplicity of videos.

  • @Ahmad-jc7by
    @Ahmad-jc7by Рік тому

    ❤❤❤

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

    Thanks a lot

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

    super cool videos bro. thanks . when will the playlist be updated bro? . It is difficult to search the videos bro

    • @BroCodez
      @BroCodez  3 роки тому +2

      I'm currently updating the videos now, I have the new videos unlisted and will release them in a batch weekly

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

      @@BroCodez thanks bro. hope this channel reaches good number of subscribers soon

  • @nerrixj.l.6102
    @nerrixj.l.6102 2 роки тому

    😍

  • @AmirRa481
    @AmirRa481 6 місяців тому

  • @chichung2243
    @chichung2243 7 місяців тому

    Thanks

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

    Pretty epic

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

    super!

  • @johan-oe9kz
    @johan-oe9kz 2 роки тому

    👍

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

    thanks

  • @aiueo8962
    @aiueo8962 11 місяців тому

    gg bro, after i watched this video, i can write some code without your tutorial...

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

    naisuu

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

    thaaaaaaaaaaaank you 💕💕💕.

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

    1:48 I saw that coming