Java super keyword 🦸‍♂️

แชร์
ฝัง
  • เผยแพร่เมื่อ 3 ก.พ. 2025

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

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

    //********************************************
    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;
    }
    }//********************************************

    • @Kingdd1os
      @Kingdd1os 2 ปีที่แล้ว +3

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

    • @JiosWrld
      @JiosWrld 2 ปีที่แล้ว

      @@Kingdd1os hm...

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

    this was Super() easy to understand

  • @reynaldojrcapilitan943
    @reynaldojrcapilitan943 3 ปีที่แล้ว +37

    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!

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

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

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

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

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

      thanks Furious! Hopefully that will change someday

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

      @@BroCodez lol yea

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

      VD 😂

    • @shyam.upadhyay
      @shyam.upadhyay 3 ปีที่แล้ว

      @@BroCodez 227k now bro.

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

      I year later 291k we'll done bro

  • @professionalaveragekid
    @professionalaveragekid 7 หลายเดือนก่อน +2

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

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

    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

  • @husein_alfil
    @husein_alfil 3 ปีที่แล้ว +16

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

  • @thang.d2382
    @thang.d2382 3 ปีที่แล้ว +2

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

  • @adish6861
    @adish6861 ปีที่แล้ว

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

  • @younesbarais
    @younesbarais 11 หลายเดือนก่อน

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

  • @TheSkippy82
    @TheSkippy82 หลายเดือนก่อน

    you are single handedly getting my through my java course ty

  • @Khadheeja
    @Khadheeja 9 หลายเดือนก่อน +1

    Awesome Stuff

  • @OrinOn127
    @OrinOn127 หลายเดือนก่อน

    well explaination

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

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

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

    superb vid. very powerful presentation

  • @jeffdoo3806
    @jeffdoo3806 6 หลายเดือนก่อน

    Awesome video. I'm new to programming and learning JAVA atm. Would surely enroll in one of your courses if you had them because all the subjects i struggle with in my textbook are always clear to me after one of your video's!

  • @Tarnovgrad
    @Tarnovgrad ปีที่แล้ว

    You show very good examples and explain it very well!

  • @praveenbalajikalla-ng6mx
    @praveenbalajikalla-ng6mx 10 หลายเดือนก่อน

    woww

  • @familyguyshorts2740
    @familyguyshorts2740 2 ปีที่แล้ว

    Amazing😀😀😀

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

    Great Lecture

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

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

  • @afaqulhassan5399
    @afaqulhassan5399 ปีที่แล้ว

    Besttttt

  • @lanak.6886
    @lanak.6886 2 ปีที่แล้ว +1

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

  • @vaibhavborane6763
    @vaibhavborane6763 2 ปีที่แล้ว

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

  • @manchester250
    @manchester250 2 หลายเดือนก่อน

    Because of you good sir! I was having fun with my programming exam

  • @dianamilenaarchilacordoba4632
    @dianamilenaarchilacordoba4632 4 หลายเดือนก่อน

    great video!!! I'm infinitely grateful for your dedication and big heart to share this knowledge with the world. Thank you soo much

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

    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  4 ปีที่แล้ว +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 4 ปีที่แล้ว

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

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

    Super duper

  • @AlirezaR5
    @AlirezaR5 ปีที่แล้ว

    Awesome

  • @tekengaged2230
    @tekengaged2230 7 หลายเดือนก่อน

    Excellent Video!!!

  • @yigitalkan2916
    @yigitalkan2916 ปีที่แล้ว

    HEYY BROS This guy is great Greetings from Bern

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

    really enjoying your tutorial

  • @MusicMan121
    @MusicMan121 2 ปีที่แล้ว

    Best java course I've found, by far

  • @unalysuf
    @unalysuf 2 ปีที่แล้ว

    it is very clear explanation

  • @mullim9860
    @mullim9860 2 ปีที่แล้ว

    Really helpful content👍🏻

  • @typn6472
    @typn6472 2 ปีที่แล้ว

    thanks for the video

  • @userkanchank
    @userkanchank ปีที่แล้ว

    Best❤

  • @MrNb-xu7jl
    @MrNb-xu7jl 2 ปีที่แล้ว

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

  • @DeepakKumar-dw1re
    @DeepakKumar-dw1re 3 ปีที่แล้ว

    Super

  • @angelamwelwa784
    @angelamwelwa784 2 ปีที่แล้ว

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

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

    Finally i know what super is doing :D thanks

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

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

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

    Amazing

  • @FaridHasanaliyev
    @FaridHasanaliyev ปีที่แล้ว

    great

  • @JashanSingh-ve7yx
    @JashanSingh-ve7yx 3 ปีที่แล้ว

    Good

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

  • @rinadem5219
    @rinadem5219 ปีที่แล้ว

    amazing

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

    NIce.

  • @yevgenomelchenko732
    @yevgenomelchenko732 ปีที่แล้ว

    Cool lesson. Thanks.

  • @danialsharifi3513
    @danialsharifi3513 2 ปีที่แล้ว

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

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

    I m the 1000th like of this video xD

  • @bluecross963
    @bluecross963 2 ปีที่แล้ว +1

    Best, as always :)

  • @jojovstojo
    @jojovstojo 2 ปีที่แล้ว +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.

  • @sabermmirza
    @sabermmirza ปีที่แล้ว

    your geniuse

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

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

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

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

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

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

  • @daviddeguzman7218
    @daviddeguzman7218 2 ปีที่แล้ว

    Great! 👍

  • @avi-ish8669
    @avi-ish8669 11 หลายเดือนก่อน

    super

  • @firepower01
    @firepower01 3 ปีที่แล้ว +7

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

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

    Well explained, Thanks a lot

  • @Ahmad-jc7by
    @Ahmad-jc7by 2 ปีที่แล้ว

    ❤❤❤

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

    elegant simple and awesome! thank you!

  • @lukashenrique4295
    @lukashenrique4295 ปีที่แล้ว

    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.

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

    naisuu

  • @ברבר-ס2ב
    @ברבר-ס2ב ปีที่แล้ว

    KING

  • @heviaraz6559
    @heviaraz6559 2 ปีที่แล้ว

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

  • @maelscott
    @maelscott 3 หลายเดือนก่อน

    Becoming a hero

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

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

  • @johan-oe9kz
    @johan-oe9kz 3 ปีที่แล้ว

    👍

  • @EdgeLordOmen
    @EdgeLordOmen 10 หลายเดือนก่อน

    Thank you for this

  • @J0rD5t3R
    @J0rD5t3R 2 ปีที่แล้ว

    You're the best

  • @HAITIANGPT
    @HAITIANGPT 10 หลายเดือนก่อน

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

  • @johndavis29209
    @johndavis29209 ปีที่แล้ว

    Dude i love you so much.

  • @nerrixj.l.6102
    @nerrixj.l.6102 2 ปีที่แล้ว

    😍

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

    Thanks for the example, very clear.

  • @shwaysregaldexter47
    @shwaysregaldexter47 2 ปีที่แล้ว

    Getting lessons from gigachad. Bruv this is bussin

  • @oscarcrowe5798
    @oscarcrowe5798 2 ปีที่แล้ว

    thankyou sir

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

    YOU ARE A LEGEND!!

  • @leonard0104
    @leonard0104 2 ปีที่แล้ว

    What would happen if I would only run: sout(hero2); AT 07:00 ? Why would it not just print out the 3 Values too? Why is the super-statement needed?

    • @leonard0104
      @leonard0104 2 ปีที่แล้ว

      Is it because we cannot make objects on superclasses in java, so the hero-class has to extend the "toString" methode of the person-class? would that be called overriding?

  • @danny.3036
    @danny.3036 3 ปีที่แล้ว

    Thanks, Bro! ☕ You're awesome!

  • @bengamin98
    @bengamin98 2 ปีที่แล้ว

    Super basically equals Parent. Good to know!

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

    Well done! :-)

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

    ♥️

  • @曾毓哲-b1t
    @曾毓哲-b1t ปีที่แล้ว

    Thank you very much

  • @ghettoslick2000
    @ghettoslick2000 ปีที่แล้ว

    Thanks Bro

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

    Thanks bro

  • @GOODBOY-vt1cf
    @GOODBOY-vt1cf 3 ปีที่แล้ว +1

    4:28

  • @gedasred1
    @gedasred1 4 ปีที่แล้ว +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

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

    thx) it was super!

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

    explained it better than my prof

  • @Sofia-rg3er
    @Sofia-rg3er 10 หลายเดือนก่อน

    Thank you bro

  • @MukeshchowdaryVinjam
    @MukeshchowdaryVinjam 4 หลายเดือนก่อน

    Commenting here for the reach

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

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

  • @xdlovas
    @xdlovas 10 หลายเดือนก่อน

    how cool is that. Sorry i'm comming from c++ :D

  • @MrLoser-ks2xn
    @MrLoser-ks2xn 2 ปีที่แล้ว

    Thanks

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

    I never knew "super" keyword even existed

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

      It's a thing

  • @aiueo8962
    @aiueo8962 ปีที่แล้ว

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

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

    U should try unity game engine

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

      I would like to, but I have my hands full right now lol

  • @barkache93
    @barkache93 2 ปีที่แล้ว +1

    Hello bro
    I'm the 444.444 subscriber for your super channel, hope you say hi to your new bro🤣

    • @BroCodez
      @BroCodez  2 ปีที่แล้ว +1

      hi

    • @barkache93
      @barkache93 2 ปีที่แล้ว

      @@BroCodez 🤣🙈💖

  • @王继寒
    @王继寒 3 ปีที่แล้ว

    thanks

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

    yepppppppp