Java constructors 👷

แชร์
ฝัง
  • เผยแพร่เมื่อ 28 ก.ย. 2024
  • Java constructor constructors tutorial explained for beginners
    #Java #constructor #constructors

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

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

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

    Human human1 = new Human("Rick",65,70);
    Human human2 = new Human("Morty",16,50);

    human1.drink();
    human2.eat();

    }
    }
    //********************************************************
    public class Human {
    String name;
    int age;
    double weight;

    Human(String name,int age,double weight){

    this.name = name;
    this.age = age;
    this.weight = weight;
    }

    void eat() {
    System.out.println(this.name+" is eating");
    }
    void drink() {
    System.out.println(this.name+" is drinking *burp*");
    }

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

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

      Thanks Mr. Bro Code!

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

      Ayo helped🎉

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

      Your code is more valuable for me. I understand everything because of u. Your way of teaching is tremendous. Now I love coding. Thank u bro. What's ur name??

    • @itsme-cb1ky
      @itsme-cb1ky 6 หลายเดือนก่อน

      ♥♥

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

    I can't tell you how much I appreciate your English. The wording and work are easily readable. By far better than the average tutorial.

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

      I agree. I understand everything with my Pre-Intermediate English.

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

      @@andycadcam2265 did you watch this with or without subtitles?) i have also this level of english but i cant make out what he talks about without subtitles)
      maybe i have a bad sense of listening)

    • @fer_vicius
      @fer_vicius ปีที่แล้ว +13

      It's definately a breath of fresh air after going through so many Indian tutorials LOL

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

      Agree with you

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

      not like these indians xD, some have great speaking skills, but some...

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

    This is genuinely one of the best content out there. Appreciate it man, very clear and to the point. Amazing !

  • @IsiahDoesVlogs
    @IsiahDoesVlogs 5 หลายเดือนก่อน +2

    This guy is the best, and he literally always posts the code he works on after.

  • @MikeTManio-vv9en
    @MikeTManio-vv9en ปีที่แล้ว +5

    Bro, you just literally always save me, you're a better professor than my college professor. Always appreciated the tutorials

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

    you're literally better than other teacher! keep it up bro!

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

      he's amazing

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

    Bro besides your one-by-one telling, your clean tongue helped a lot for people who's their first tongue is not English. Thx a lot again.

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

    These are by far the most helpful videos I have come across.

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

    You taught me more clearly than my teacher or my book could have...
    Maybe more than what I could have planned by conducting experiments by myself!!!

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

    Ever since I started watching your videos I have learned a lot, you have simplified a lot of concepts.

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

    A real teacher never charges his students. Real knowledge does knot have a price tag! You a living legend Bro!

    • @dumdum7099
      @dumdum7099 5 หลายเดือนก่อน +1

      Yeah bro a real teacher doesn't really need to eat. A real teacher can just eat his real knowledge and keep his real stomach real full.

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

    You are a better professor than my professor. You're a life saver bro!

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

    Wow! This actually made sense. I appreciate these videos so much!

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

    Infinitely more helpful than my university lectures. Thanks heaps!

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

    Best constructor tutorial I think I have seen on youtube. Well done you helped me out mega on a big part of my project im stuck on.

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

    WHERE WAS BRO CODE THIS WHOLE SEMESTER! I LOVE YOU MANNNN

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

      "I love you too random citizen!"

  • @PopeHeavy
    @PopeHeavy 10 หลายเดือนก่อน +1

    I like how much more informative and laconic it is than paid courses, keep it up

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

    Thank you so much! Your videos are really helping me, so good! 😃🤩💪🏻

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

      thanks for watching Dino

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

    Apart from explaining everything very clearly, Bro got good taste in shows too.

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

    Thanks a lot, I've seen a good amount of constructor videos but yours was the only one that made it make sense for me.

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

    Thank you for making those “mistakes” and then explaining why things are done a certain way.

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

    big fan from india you are like mentor to me
    🤗

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

    You give clear explanation. Great job!

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

      thank you for watching Vincent!

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

    You are Awesome! Wishing You Millions of subscribers .

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

    you're literally better than my teacher , thx.

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

    I was really confused making constructors!!!!!!
    But you really helped me !

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

    Ayyy @ 6:45 Rick and Morty, nice.

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

    thank god for people like u. you r really come in clutch

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

    watched manyyy YT videos but by far bro code is the besttt!

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

    Explained superbly mate thanks a lot.

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

    daaang nobody can change my mind that you're the best at teaching !!

  • @СветланаНикитина-у6е
    @СветланаНикитина-у6е ปีที่แล้ว

    Awesome video! I am smashing the like button

  • @ACE-qd3sw
    @ACE-qd3sw ปีที่แล้ว

    Whenever I dont understand a concept this is where I come to tysm broCode

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

    This video is very useful🥳🤠

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

    Couldn't remember why we needed the constructor in java all turorial teach you how you creat them and use them but not the why ... thx man rly

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

    Sir, I was about to quiet coding… you saved me.

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

    That was good. Just the right pace.

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

    I know all this but you are explaining it so good that I watch them all again and again

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

    You make things easy to understand.

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

    Great tutorial.

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

    Thank you for providing the code in the comments. I was able to print it out and write notes on it. This makes the code more tangible which allows me to see the how, why, and where of the code! Now I can understand this! This helps tremendously!! Keep up the good work Bro!

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

    Excellent work, for the difference between the Constructor and normal object

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

    it's a very clear explanation, thanks

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

    Youre a real one ma man

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

    nice ... great video...!!!!

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

    Sir, if you only know how this video helped me in my dilemma. thank you so much. I was actually, for almost 2 days looking for a solution in my practice programming as I am currently doing an IT schooling, then i stumbled unto your video, and right away i liked your video and subscribed your channel as the least i can do to thank you.... :D

  • @Third-hb8yb
    @Third-hb8yb ปีที่แล้ว

    Hi bro I want more complicated code explanation about constructors please provide us

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

    jesus christ i wish more schools and guides would use plain english. literally the use of simple words makes everything click. It took me until this video to realize that this whole process is very similar to python function calls with a twist. thank you

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

    bro you are a legendaire keep it up ✨

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

    Easy and Straight to the point!! You're really talented in explaining complex things that's easy to understand. Keep it up!

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

    Awesome stuff. Thank you

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

    Keep up good job bro

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

    Here you go bro!!! I punched the like button, now my lab top is broken!!! Who will get it repaired? I have no money

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

    Thanks bro!! I understood more in 10 minutes video from you than my teacher in 2 hours meeting xD

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

    Awesome !!!!!

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

    I was smiling alone, you making coding so interesting😊

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

    Thanks for saving me from watching 1hr long videos on each topic which you explain within 2-10 minutes.
    You literally great BROCODE SENSEI!.

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

    perfect explanation.. really helpful thanks

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

    Great one.

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

    it was great

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

    thank you mr. code very helpful

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

    Hy bro keep going you are still the best

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

    love & peace bro
    keep rising up mate

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

    Best teacher in the WORLD( );

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

    GREAT LESSON!!! I definitely now understand this topic

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

    Love the Rick and Morty reference

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

    no bs, pure info. many thanks👍

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

    Huge

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

    Nice tut!

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

    Thank you for this Bro. You're super helpful

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

    Thank god for this man

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

    awesome !!!!

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

    Small and efficient video

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

    Very useful video!

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

    This bro is a legend

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

    You are awesome bro!

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

    Perfect explanation, better than all other videos

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

    You are teaching us how to be awesome at Ja.. Wait for it... Vaa

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

    Best bro

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

    Thank you sir.. it helps me a lot..

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

    much appreciate and lv you Bro ❤‍🔥

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

    good job

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

    bro ,can you make a live session with your bros for a cheerfull conversation. we are exited to see your face and i have imagined your face depends on your voice.so please try to make it.take care bro

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

    QUESTION: Why we have to declare the variables of the object in class human twice. One in the begining of the class and one in the constructor's brackets???

    • @psseudx
      @psseudx 4 หลายเดือนก่อน +1

      We do not declare them in the brackets. We just pass them as parameters

    • @mryoloTHEgreek
      @mryoloTHEgreek 4 หลายเดือนก่อน +1

      @@psseudx thank you!!!!!

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

    Agreed very helpful video

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

      thanks for watching Archer

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

    High quality tutorial Bro, keep the good work!

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

    Perfect

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

    Thanks Bro, so helpful

  • @Luke.Willey
    @Luke.Willey 4 หลายเดือนก่อน

    Constructors are the best

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

    Nice.

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

    nice video bro

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

    best teacher

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

    nice one mate thanks

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

    What a man!

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

    What if i want to use an object to retrieve for example the value of a variable of that object class? It would be pretty pointless to only be able to create an object of that class when I need to pass the variable I want to retrieve from it into it first. Does it work with getter and setter methods?

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

      yes that's a separate video. We haven't talked about getters and setters yet

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

    nicee bro

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

    Life Saver!!!!

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

    Amazing explanations. Keep it up bro

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

    great content thank you

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

    great