Java toString method 🎉

แชร์
ฝัง
  • เผยแพร่เมื่อ 26 มิ.ย. 2024
  • Java toString method tutorial explained
    #Java #toString #method #tutorial #explained
    //*****************************************
    public class Main {
    public static void main(String[] args) {
    // toString() = special method that all objects inherit,
    // that returns a string that "textually represents" an object.
    // can be used both implicitly and explicitly
    Car car = new Car();

    System.out.println(car.toString());
    // or
    System.out.println(car);
    }
    }
    //*****************************************
    public class Car {
    String make = "Ford";
    String model = "Mustang";
    String color = "red";
    int year = 2021;
    public String toString() {
    return make +"
    "+model+"
    "+color+"
    "+year;
    }
    }
    //*****************************************
  • วิทยาศาสตร์และเทคโนโลยี

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

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

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

    // toString() = special method that all objects inherit,
    // that returns a string that "textually represents" an object.
    // can be used both implicitly and explicitly

    Car car = new Car();


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

    // or

    System.out.println(car);

    }
    }
    //*****************************************
    public class Car {
    String make = "Ford";
    String model = "Mustang";
    String color = "red";
    int year = 2021;

    public String toString() {

    return make +"
    "+model+"
    "+color+"
    "+year;

    }
    }
    //*****************************************

  • @sakhiwodlalisa4844
    @sakhiwodlalisa4844 2 ปีที่แล้ว +35

    🇿🇦 South African junior Software developers thank you for your service. I have made over 200slides and counting of your full tutorial. You're better than my lecturers.

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

    Very simple, right to the point, clear, no useless blabla.. great video. Thank you so much

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

    Best explanation i've come across, thanks!!

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

    loving the java because of this series of tutorial

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

    Your way to explain is the best🙃thanks!

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

    If you're ever struggling with Java in school, just come to this channel and follow this man's video. You're going to understand the materials so much better and possibly make it into development

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

    wonderful

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

    Perfect

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

    ur the best

  • @maureenfleming5868
    @maureenfleming5868 2 หลายเดือนก่อน +1

    Great stuff, thank you

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

    Great job!

  • @user-eo6sv1gs7p
    @user-eo6sv1gs7p หลายเดือนก่อน

    I like your explanation bruh i think You're The best Teaching I've Ever Seen

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

    Great❤

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

    This channel is incredible!

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

    Awesome tutorial!

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

    Bro I'm reviewing basic stuffs cuz I tend to forget and I just wanna say that you're a godsent to this world. Keep it up man!

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

    Nice!!!

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

    great video very helpful!!

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

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

    It took 1 hour to explain this in lectures.still did not get it. Bro explained it perfectly in 6 mins. God bless you bro

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

    Great explanation bro, thank you

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

    Great *Bro code*
    i am going to download your all java playlist
    great explanation
    and thank you *Bro* 👍👍👍

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

      sweeeeet! Thanks for watching Muhammad!

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

    Thanks, Bro! ☕ You're awesome!

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

    This is something new

  • @kalab-ej1oh
    @kalab-ej1oh 3 หลายเดือนก่อน +2

    clear and focused, great work Bro!

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

    great videos

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

    crystal clear, Thanks Bro

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

    One time i had a mistake when i saw the 82'th clip in ur list, and then, i realized and watched again at the first video, i easily to understand. That's a amazing :D Thanks guy for sharing

  • @spooky_zn6
    @spooky_zn6 24 วันที่ผ่านมา

    nice work

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

    Fantastic! Thank you!!

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

    Shit dude I just discovered your channel and it is sooo helpful (I like how you explain stuff simply and make it easy to understand) . Keep helping people like this and I'm sure your channel will grow (you definetly deserve more than 5K subscribers)

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

      thanks Ruben!

    • @eltallerdedante6335
      @eltallerdedante6335 2 ปีที่แล้ว +6

      lol he had 5K suscribers 1 year ago? Definitely he grew up! ^^

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

      lol now he has 600k!

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

      @@gaminggoddessaria Well he now has 1 MILLION !

    • @khalidbaloch4457
      @khalidbaloch4457 6 หลายเดือนก่อน +2

      And now there are 1.5 million subscribers.

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

    good teach!thanks bro

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

    simple explanation thank you a lot

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

    Owesome bro i always love your videos

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

    Man you're the best!!!!

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

    Great Video!

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

    the best java free course available greet work broCode

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

    Thank you! From Ukraine.

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

    Awesome

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

    Thank you!

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

    I finally get it lol thanks you have the best explanations I am glad I found your channel!

  • @eren-qu9wm
    @eren-qu9wm ปีที่แล้ว

    Thanks 👍😊 bro you are living legend

  • @user-zq6yx7of5f
    @user-zq6yx7of5f ปีที่แล้ว

    Thank you very much !!

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

    my appreciation

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

    You are a legend man

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

    Thanks, bro.

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

    Nice.

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

    Thanks!

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

    I love you BRO!!!! From Russia with LOVE!!!!

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

    You are the best thank you♥️

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

    Thank you so much sir.

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

    thank you bro

  • @LUCIFER-rc7xo
    @LUCIFER-rc7xo 2 ปีที่แล้ว

    Thnks senpaii

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

    thank you !!

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

    Thank you bro!💛

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

    You're the BEST 😉

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

    Thank you.

  • @_7.T_
    @_7.T_ 3 ปีที่แล้ว

    thank you my Bro ♥♥♥

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

    best bro

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

    great

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

    coool

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

    like it

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

    thx bro

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

    very good

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

    30th. Thank you, ma Bro Sensei

  • @axecordgaming2003
    @axecordgaming2003 6 หลายเดือนก่อน +1

    really nice

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

    this was explained so well! thanks bro, ima fellow bro now ;D

  • @Sir-gf3pv
    @Sir-gf3pv ปีที่แล้ว

    Thanks broseph

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

    Thanks

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

    Makes sense

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

    Thank u bro

  • @augischadiegils.5109
    @augischadiegils.5109 3 ปีที่แล้ว

    Thanks :)

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

    nice video, much better than my lecturer did

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

    Cool :)

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

    thanks

  • @user-rv7wf5rt6m
    @user-rv7wf5rt6m 2 หลายเดือนก่อน

    👍

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

    Nice

  • @robingloryvideo9064
    @robingloryvideo9064 11 หลายเดือนก่อน +1

    very good🎉🎉🎉🎉🎉

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

    Ayo, I'm passing Java, thanks!

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

    Pure bliss

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

    thank you.

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

    Well explained Bro!

  • @pa-305
    @pa-305 3 ปีที่แล้ว

    Best bro!!!!

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

    😘😍😻

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

    Ok, so we can use toString implicitly, without using "make, model, color so on" manually. Completely understood. 30th. Thank you, ma Bro Sensei!

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

    nice

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

    bro @ 1:53 i typed sysout(pizza) from the overloaded constructor lesson and came with similar answer I was like "java shouldve created a code for easier access" , and behold the answer to that problem is this lesson lmao, I like your tutorials bro have a nice day!

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

    i lov u bro

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

    Damn! I better understand your tutorials than yt tutorials in my native language. Thank you, great job:)

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

    Dropping a comment :]

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

    Gratitude from Lithuania

  • @SD-gc6rm
    @SD-gc6rm 2 ปีที่แล้ว

    goooooooooood work bro thx

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

    ty

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

    good

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

    🥰

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

    a usual w from the Bro Code

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

    Nice Explanation sir

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

    GOAT

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

    Dang I can’t be the only one that’s been calling my objects variables by print lines this entire time 😂 I feel silly now