Java overloaded constructors 🍕

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

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

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

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


    Pizza pizza = new Pizza("thicc crust","tomato","mozzerella","pepperoni");

    System.out.println("Here are the ingredients of your pizza: ");
    System.out.println(pizza.bread);
    System.out.println(pizza.sauce);
    System.out.println(pizza.cheese);
    System.out.println(pizza.topping);

    }
    }
    //**********************************************************************************
    public class Pizza {
    String bread;
    String sauce;
    String cheese;
    String topping;

    Pizza(){

    }

    Pizza(String bread){

    this.bread = bread;
    }

    Pizza(String bread,String sauce){

    this.bread = bread;
    this.sauce = sauce;
    }

    Pizza(String bread,String sauce,String cheese){

    this.bread = bread;
    this.sauce = sauce;
    this.cheese = cheese;
    }

    Pizza(String bread,String sauce,String cheese,String topping){

    this.bread = bread;
    this.sauce = sauce;
    this.cheese = cheese;
    this.topping = topping;
    }
    }//**********************************************************************************

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

    Sit Back, Relax & Enjoy the show is my Favourite Part.

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

    I like the fact that you are so authentic by saying I probably spelled that wrong, reminding myself. Thank you for your videos, you provide education for free and I hope ppl like yourself will be paid more than those pretenders on TH-cam that "help" people by giving money to homeless (just an example among so many) that pretend to be so kind and videotape themselves doing an act of kindness (kinda ironic). I wonder could we also donate to your channel somehow or not? Personally I do not own much but comparing your channel to most Udemy classes you deserve that 10 euros way more than those aforementioned and I would be more glad to support you even with that amount. Thanks bro.

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

    Thank you for this, simple and effective explanation!

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

    Thank you! You are really good with explaining Java concepts - and under 9 minutes is even better.

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

    Vegan pizza?!?
    That was hilarious bro! 😅😂
    Thank you so much for these videos. Yours is the most full and systematic playlist to learn java with fun and a Bro language on TH-cam! ❤

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

    The only youtuber I ve seen whose comment section has nothing but thank you comments. Speaks Volumes!
    And thank you for doing an amazing job!

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

    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

  • @dianamilenaarchilacordoba4632
    @dianamilenaarchilacordoba4632 16 วันที่ผ่านมา

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

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

    You are batter than other teacher! Thank you for this video!😄😄

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

    Awaiting to see next series or lessons for Java Advanced!

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

    I am happy that i am seeing your channel growing up! Keep going! U are doing a great work

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

    Well explained! Keep up the good work!

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

    Well Explained, deserve more subs ❤️

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

    Best teacher!!! 👍👋

  • @황윤우-e6h
    @황윤우-e6h 2 ปีที่แล้ว +2

    How can you be so great tutor? I wish i found you as soon as you uploaded video last year. I mean it, you are a great teacher.
    I was totally not interested in Java almost quting thus job. But now i'm interested. And one day, i want to take you C , python too.

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

    Nice one bro.
    As always, excellently explained.

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

    Easy explained tutorial. Well done.

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

    thx brotherman!
    excelent video. Probably wrote 'excelent' wrong but I don't care :-D

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

    Your videos are the best!

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

    Been watching your videos since 2 years, you are mine hero of all programming languages

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

    thankyou so much for the video series

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

    Thanks for the pizzas bro!

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

    Good stuff Bro!

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

    You're a hero bro keep the good work

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

    Thanks for these really great courses

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

    This was helpful

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

    thank u bro for the awesome video

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

    Thnku bro for tho awesome video

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

      thanks for watching JAzim!

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

    thaks all videos are just excellent!

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

    great video thank you bro

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

    It's just me, or that crust loking kinda *THICC*

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

      stuffed and thicc

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

    Great

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

    greate video as always

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

    nice video Bro Code

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

    Great video

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

    i wana ask... i see you are PRO:) eclipse or IntelliJ, diferences? is it colors you like themes? or why you like it?:) im noob in java, but already paid for my lessons.. You are my alternative teacher :D

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

      I don't have a lot of experience with IntelliJ, so I can't speak on it's behalf. But there is a growing trend of people switching to IntelliJ, so that might not be a bad IDE to begin with.

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

    Very clear explanation!

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

    Appreciate this!

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

    Great video bro

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

    Thank you may allah bless you

  • @No-Userrfound
    @No-Userrfound 3 ปีที่แล้ว

    Love your explanation bro!!!

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

    at this point brocode has become my free lecturer

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

    Nice

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

    Im so constructed is unreal

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

    really great tutorial

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

    You remind me of barney stinson

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

    Thanks for video 🙏

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

      Thanks for watching Babu!

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

    Hey you! yeah you Bro code, you're AMAZING!

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

    This was better than trying to learn it on Zybooks

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

    this is awesome ! come tech in my college 😍😍😍😍.

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

    Like methods-constructors. One by one, 29th. Thank you, ma Bro Sensei!

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

    nice

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

    good

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

    Thanks bro, you helped me out.

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

    Best of the best

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

    Thanks, Bro! ☕ You're awesome!

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

    Zero dislikes, what a legend.

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

    🍕 pepperoni best pizza on earth

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

    Great job!

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

    Like

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

    Thanks, Bro!

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

    to the point, what I like... you speak clearly, that's good too. thanks! btw: -thicc is spelled 'thick', 😜ha ha!

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

    thanks bro

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

    ❤❤❤❤❤❤❤❤❤

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

    Σε ευχαριστούμε Bro για αυτή τη σειρά με τα tutorials στη Java!

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

    Thank you!!

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

    👏😄

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

    thx 4 bid bro !

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

    some food for the allmighty algorithm : "great , concise, high quality, .addrandomAdjective(); "

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

    so i have a question but is there a way to stop the console from showing null or is it just something that is part of overloaded constructors.

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

    Nice.

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

    superb :D

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

    Do I really need to instantiate all the arguments in every method?

  • @phsrambots
    @phsrambots 3 หลายเดือนก่อน +1

    I'm soooo confused you keep talking about string cheese!!! What's going oN!!!

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

    🍕nice bro!🍕

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

    Bro what would happen if we did this in the Pizza class:
    Pizza(String bread,String sauce,String cheese,String topping){

    this.bread = bread;
    this.sauce = sauce;
    this.cheese = cheese;
    this.topping = topping;
    }
    Pizza(String bread,String sauce,String topping,String cheese){

    this.bread = bread;
    this.sauce = sauce;
    this.topping = topping;
    this.cheese = cheese;
    }
    and then we created an object like this:
    Pizza pizza = new Pizza("s1" , "s2" , "s3" , "s4");
    Which one would be the topping and which one would be cheese?

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

      Java will encounter an error due to a duplicate constructor. Java looks at the order and number of the data types within the parameters. For all intents and purposes, your IDE will think they are the same constructor 👍

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

      @@BroCodez thanks bro

  • @JamieLawler-v4r
    @JamieLawler-v4r ปีที่แล้ว

    thx bro

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

    Thank you

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

    👍

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

    Thanks senpaii

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

    A playList only with project in java please

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

    thank you my Bro ♥♥♥

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

    niceeeeeeeeeeeee

  • @rushikesh-vk3po
    @rushikesh-vk3po ปีที่แล้ว

    4:30 overloadded constructor

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

    🙏

  • @yeabsrasolomon-xt2ix
    @yeabsrasolomon-xt2ix 2 หลายเดือนก่อน

    Thankyou

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

    Thanks

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

    Thank you pizza guy

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

    Hello Brocode. Can you demo text to speech => virtual assistant java. Can you help me. Thank you verry much... Love broCode

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

      I haven't done that before

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

      @@BroCodez thanks you answer me, I have seach GG how to install,apply package javax.speech but don't work. can you help me ???

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

    Me who used booleans for sauce and mozzarella so i only needed two overloaded constructors... #italiancraft

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

    Like so much

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

    Thank you so much sir.

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

    ty bro

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

    that Pizza never existed..

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

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

    thannnnnk you

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

    A pizza with nothing will cost you 0 dollars 🍕🍕

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

    But what is the usefulness for this kind of overload?

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

    Thanks Bro, 06/07/2024