Java overloaded constructors 🍕

Поделиться
HTML-код
  • Опубликовано: 8 сен 2024
  • Java overloaded constructors multiple constructor tutorial example for beginners
    #Java #overloaded #constructors

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

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

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

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

  • @cate01a
    @cate01a 4 года назад +20

    Thank you for this, simple and effective explanation!

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

  • @nathanielpolzin6676
    @nathanielpolzin6676 2 года назад +10

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

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

    Awaiting to see next series or lessons for Java Advanced!

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

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

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

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

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

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

    Best teacher!!! 👍👋

  • @EnglishVocabularyBooster
    @EnglishVocabularyBooster Год назад +1

    Easy explained tutorial. Well done.

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

    Well explained! Keep up the good work!

  • @pushankarmakar1783
    @pushankarmakar1783 2 года назад +1

    thankyou so much for the video series

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

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

    This was helpful

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

    Appreciate this!

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

    Nice.

  • @gevorgmartirosyan8189
    @gevorgmartirosyan8189 3 года назад +3

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

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

    Nice one bro.
    As always, excellently explained.

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

    Thank you may allah bless you

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

    great video thank you bro

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

    Great

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

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

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

    Your videos are the best!

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

    Thanks for these really great courses

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

    thaks all videos are just excellent!

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

    greate video as always

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

    Very clear explanation!

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

    Thnku bro for tho awesome video

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

      thanks for watching JAzim!

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

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

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

      stuffed and thicc

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

    Im so constructed is unreal

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

    thank u bro for the awesome video

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

    at this point brocode has become my free lecturer

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

    thanks bro

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

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

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

    Well Explained, deserve more subs ❤️

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

    This was better than trying to learn it on Zybooks

  • @infinitepossibilities2614
    @infinitepossibilities2614 2 года назад +1

    Thanks for the pizzas bro!

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

    really great tutorial

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

    Best of the best

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

    Thanks for video 🙏

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

      Thanks for watching Babu!

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

    👏😄

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

  • @lilangel4296
    @lilangel4296 8 месяцев назад

    ❤❤❤❤❤❤❤❤❤

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

    Nice

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

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

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

    Good stuff Bro!

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

    Great video

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

    Thanks, Bro!

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

    Thank you!!

  • @user-yr3tk9hy2q
    @user-yr3tk9hy2q Год назад

    thx bro

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

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

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

    You're a hero bro keep the good work

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

    Thanks bro, you helped me out.

  • @No-Userrfound
    @No-Userrfound 3 года назад

    Love your explanation bro!!!

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

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

  • @user-in5wp8yo2i
    @user-in5wp8yo2i 10 месяцев назад +1

    🍕 pepperoni best pizza on earth

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

    nice

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

    Thanks senpaii

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

    thx 4 bid bro !

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

    ty bro

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

    Great video bro

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

    Great job!

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

    👍

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

    superb :D

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

    Thanks, Bro! ☕ You're awesome!

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

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

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

    good

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

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

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

    Thank you

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

    Thank you so much sir.

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

    Zero dislikes, what a legend.

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

    nice video Bro Code

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

    You remind me of barney stinson

  • @yeabsrasolomon-xt2ix
    @yeabsrasolomon-xt2ix 2 месяца назад

    Thankyou

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

    🙏

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

    niceeeeeeeeeeeee

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

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

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

    thank you my Bro ♥♥♥

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

    A playList only with project in java please

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

    Thanks

  • @PickleRickkk-cy9xb
    @PickleRickkk-cy9xb 4 месяца назад +1

    Like

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

    thannnnnk you

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

    Thank you pizza guy

  • @rushikesh-vk3po
    @rushikesh-vk3po Год назад

    4:30 overloadded constructor

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

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

  • @davidgonzalez-ge7ol
    @davidgonzalez-ge7ol 3 года назад

    thicc crust

  • @NebyuDaniel-j6b
    @NebyuDaniel-j6b 11 часов назад

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

      @@BroCodez thanks bro

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

    🍕nice bro!🍕

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

    thank you!!!!!!

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

    thank you.

  • @phsrambots
    @phsrambots 2 месяца назад +1

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

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

  • @alialhussain4139
    @alialhussain4139 3 месяца назад

    Thanks Bro, 06/07/2024

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

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

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

    🍕😮

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

    Vegan pizzaa💀💀💀