Java toString method 🎉

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

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

  • @BroCodez
    @BroCodez  4 года назад +52

    //*****************************************
    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 года назад +49

    🇿🇦 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 4 года назад +35

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

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

  • @millejadecabrera4544
    @millejadecabrera4544 3 года назад +4

    loving the java because of this series of tutorial

  • @ShreyasS-bn9lm
    @ShreyasS-bn9lm 3 месяца назад +1

    Awesome video, understood clearly
    Thanks bro Code

  • @ferfykins
    @ferfykins 4 года назад +12

    Best explanation i've come across, thanks!!

  • @Habibamohamedgabr
    @Habibamohamedgabr Год назад

    simple explanation thank you a lot

  • @chrizzly342
    @chrizzly342 4 месяца назад

    Well explained, mate! The info that toString() is called each time you use println to display an object, without the need of writing it down, was my gold nugget in this video!
    Thanks for that and keep on!

  • @sedrati_abdulaziz
    @sedrati_abdulaziz Месяц назад

    Amazing BRAVO 👏

  • @shxkxth8135
    @shxkxth8135 3 года назад +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

  • @Drill-ing
    @Drill-ing 4 года назад +1

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

    • @BroCodez
      @BroCodez  4 года назад +2

      sweeeeet! Thanks for watching Muhammad!

  • @ahlamdreams1613
    @ahlamdreams1613 3 года назад +2

    Your way to explain is the best🙃thanks!

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

  • @leonard0104
    @leonard0104 2 месяца назад

    simple, to the point, nice speed of speaking and teaching, trains of thought very nice to follow, accentuation when speaking also great. thanks mate.

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

    the best java free course available greet work broCode

  • @dianamilenaarchilacordoba4632
    @dianamilenaarchilacordoba4632 2 месяца назад

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

  • @shubhsharma19
    @shubhsharma19 2 года назад

    great videos

  • @maureenfleming5868
    @maureenfleming5868 7 месяцев назад +1

    Great stuff, thank you

  • @rubenmatton6258
    @rubenmatton6258 4 года назад +44

    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  4 года назад +6

      thanks Ruben!

    • @eltallerdedante6335
      @eltallerdedante6335 2 года назад +7

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

    • @gaminggoddessaria
      @gaminggoddessaria 2 года назад +2

      lol now he has 600k!

    • @modanny
      @modanny Год назад +3

      @@gaminggoddessaria Well he now has 1 MILLION !

    • @khalidbaloch4457
      @khalidbaloch4457 11 месяцев назад +2

      And now there are 1.5 million subscribers.

  • @axecordgaming2003
    @axecordgaming2003 11 месяцев назад +1

    really nice

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

    This is something new

  • @kalab-ej1oh
    @kalab-ej1oh 8 месяцев назад +2

    clear and focused, great work Bro!

  • @travel_to_wonders6666
    @travel_to_wonders6666 2 года назад

    Owesome bro i always love your videos

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

    crystal clear, Thanks Bro

  • @hassaanawan6888
    @hassaanawan6888 6 месяцев назад

    wonderful

  • @kalyankumar8629
    @kalyankumar8629 2 года назад

    good teach!thanks bro

  • @elan0002
    @elan0002 2 года назад

    great video very helpful!!

  • @adanskiesabaria
    @adanskiesabaria 6 месяцев назад

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

  • @MR2U2B
    @MR2U2B 3 года назад +2

    Great job!

  • @spooky_zn6
    @spooky_zn6 5 месяцев назад

    nice work

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

    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

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

    like it

  • @guidopiotrowski7900
    @guidopiotrowski7900 2 года назад

    This channel is incredible!

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

    Thank you so much sir.

  • @eren-qu9wm
    @eren-qu9wm Год назад

    Thanks 👍😊 bro you are living legend

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

  • @frankdaniel49
    @frankdaniel49 9 месяцев назад

    Pure bliss

  • @danielmilewski7659
    @danielmilewski7659 2 года назад

    Awesome tutorial!

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

    Great

  • @Joshua_t_
    @Joshua_t_ 2 года назад

    Great Video!

  • @viniciuslima1064
    @viniciuslima1064 19 дней назад

    Thanks bro

  • @bafu44
    @bafu44 Год назад

    very good

  • @hrabei8745
    @hrabei8745 10 месяцев назад

    Great❤

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

    Awesome

  • @MrLoser-ks2xn
    @MrLoser-ks2xn 2 года назад

    Thanks

  • @kouzokiodin3623
    @kouzokiodin3623 2 года назад

    Thank u bro

  • @banothuanilkumar7608
    @banothuanilkumar7608 2 года назад

    Nice Explanation sir

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

    Nice.

  • @tjsquat315
    @tjsquat315 11 месяцев назад

    Nice!!!

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

    Great explanation bro, thank you

  • @BakhtimurodPrimov
    @BakhtimurodPrimov Год назад

    great

  • @mariazinchyn
    @mariazinchyn Год назад

    Thank you! From Ukraine.

  • @ElvisSeanShonhiwa
    @ElvisSeanShonhiwa Месяц назад

    keep up the good work Bro you are the best
    can you create a swing java video

  • @mirlsgrabbaszad594
    @mirlsgrabbaszad594 6 месяцев назад

    Perfect

  • @eugenezuev7349
    @eugenezuev7349 7 месяцев назад

    my appreciation

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

  • @payalbhuyan9409
    @payalbhuyan9409 6 месяцев назад

    ur the best

  • @alisady1116
    @alisady1116 2 года назад

    You are the best thank you♥️

  • @percivalgebashe4376
    @percivalgebashe4376 Год назад

    Nice

  • @mikep1959
    @mikep1959 2 года назад

    thanks

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

    coool

  • @EMcCune101
    @EMcCune101 Год назад

    Thank you.

  • @mohammadreza1414
    @mohammadreza1414 10 месяцев назад

    Thanks, bro.

  • @setesteven7911
    @setesteven7911 Год назад

    good

  • @SD-gc6rm
    @SD-gc6rm 3 года назад

    goooooooooood work bro thx

  • @dodolookr
    @dodolookr Год назад

    nice video, much better than my lecturer did

  • @alesto8962
    @alesto8962 3 года назад +4

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

  • @sairos4057
    @sairos4057 2 года назад

    thx bro

  • @ahmedibrahim9901
    @ahmedibrahim9901 Год назад

    You are a legend man

  • @danny.3036
    @danny.3036 3 года назад +1

    Thanks, Bro! ☕ You're awesome!

  • @intellectplus276
    @intellectplus276 2 года назад

    You're the BEST 😉

  • @JuliHoffman
    @JuliHoffman 2 года назад

    Fantastic! Thank you!!

  • @grey_samurai1484
    @grey_samurai1484 2 года назад

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

  • @alexyakoveno4682
    @alexyakoveno4682 2 года назад

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

    Cool :)

  • @yazdansyed8319
    @yazdansyed8319 2 года назад

    ty

  • @gentle9964
    @gentle9964 Год назад

    best bro

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

    Well explained Bro!

  • @_7.T_
    @_7.T_ 3 года назад

    thank you my Bro ♥♥♥

  • @曾毓哲-b1t
    @曾毓哲-b1t Год назад

    Thank you very much !!

  • @johan-oe9kz
    @johan-oe9kz 3 года назад

    👍

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

    nice

  • @TWVVermin
    @TWVVermin 2 года назад

    thank you.

  • @honoredegg
    @honoredegg 2 года назад

    30th. Thank you, ma Bro Sensei

  • @anjapietralla5767
    @anjapietralla5767 10 месяцев назад

    🥰

  • @gaminggoddessaria
    @gaminggoddessaria 2 года назад

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

  • @nerrixj.l.6102
    @nerrixj.l.6102 2 года назад

    😘😍😻

  • @ericamuhammad5082
    @ericamuhammad5082 2 года назад

    Thank you!

  • @astronomy7823
    @astronomy7823 2 года назад

    Thanks!

  • @Sir-gf3pv
    @Sir-gf3pv 2 года назад

    Thanks broseph

  • @pa-305
    @pa-305 3 года назад

    Best bro!!!!

  • @brunomartel4639
    @brunomartel4639 Год назад

    so resuming everything,tostring() prints the memory address of an instance of a class (an object) and we can override that method to print whatever we want, usually it's used to print all the instance variables of an instance of a class.

  • @Simis999
    @Simis999 2 года назад

    Gratitude from Lithuania

  • @LUCIFER-rc7xo
    @LUCIFER-rc7xo 2 года назад

    Thnks senpaii

  • @sheeshimsam3032
    @sheeshimsam3032 2 года назад

    i lov u bro

  • @tamekkaknuth9612
    @tamekkaknuth9612 2 года назад

    thank you !!

  • @yvan_jkt
    @yvan_jkt 9 месяцев назад

    Makes sense

  • @amydash796
    @amydash796 2 года назад

    Man you're the best!!!!

  • @cherryb9128
    @cherryb9128 2 года назад

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