Java object passing 🏬

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

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

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

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

    Garage garage = new Garage();

    Car car1 = new Car("BMW");
    Car car2 = new Car("Tesla");

    garage.park(car1);
    garage.park(car2);

    }
    }
    //**********************************************
    public class Garage {
    void park(Car car) {
    System.out.println("The "+car.name+" is parked in the garage");
    }
    }//**********************************************
    public class Car {
    String name;

    Car(String name){
    this.name = name;
    }

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

  • @HuyNguyen-qx2jr
    @HuyNguyen-qx2jr Год назад +9

    What a brilliant way of teaching code! I'm not good at English but I can understand almost what you say in video! Thank you so much!

  • @programminglover2851
    @programminglover2851 3 года назад +18

    I really appreciate your brilliant way of teaching. It was awsome ;)

  • @dianamilenaarchilacordoba4632
    @dianamilenaarchilacordoba4632 4 месяца назад +1

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

  • @BalaKumaran-g9j
    @BalaKumaran-g9j Год назад +1

    nice explanation.
    Thanks for the videos.

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

    Easy to understand this is what i need 👍

  • @ceop1239
    @ceop1239 4 года назад +1

    Awesome teacher

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

    nice vid very good explanation

  • @TechWithSabri
    @TechWithSabri 6 месяцев назад +1

    Thanks Bro for this Series, i'm a Python Guy, but i'm enjoying getting the info again for Java

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

    Channel name is beautiful 👌🙏🏻

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

    enjoying this java tutorial, hoping for project based tutorial for java☺️☺️☺️

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

    thankyou sir its my exam tommorow and you have clear my concept

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

    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

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

    Great explanation!Thank you

  • @yellowhellow-wi9gi
    @yellowhellow-wi9gi 2 месяца назад +1

    thank you bro you are a life saver

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

    Man, at first, i just wanted to learn java to make minecraft mods. After watching your videos, now i want to learn other languages too. You are great, much love ❤

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

      wow cool dude

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

      your awesome I did not know you can create minecraft mods using java

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

    great explination

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

    nycc

  • @deeplife9654
    @deeplife9654 Год назад +2

    Bro code is incredible. So fun and easy to learn. I am a self learner. So far I feel that I do not need anyone help to learn Java 😂😂. Bro is more than enough. ❤. To point and short & all necessary explanations

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

    Another simple example, thanks.

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

    clear, concise. Liked.

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

    Nice

  • @iamTHIEN013
    @iamTHIEN013 8 месяцев назад +1

    Please do the road map, what to study in JAVA to get a job. Thank you so much

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

    you are the absolute best bro. i love you bro

  • @বাউণ্ডুলেঅনুপ

    Well explained! Bro

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

      thanks for watching Codle

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

    Best broooo

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

    NIce.

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

    how do you only have 11k subs I've recommended you to like every new coder I know

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

    Thanks, Bro! ☕ You're awesome!

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

    Thank you so much Sir ..

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

    nice

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

    easy to understand

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

    Bro is just a lifesaver

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

    lets go bro

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

    this may seem weird I love how you put a symbol or picture after your title!!

  • @DudeWhoGames
    @DudeWhoGames 4 года назад +7

    Do you happen to have a discord by any chance? would be really helpful to get help on more specific problems! Other wise amazing videos!

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

      I'd love to, but I don't think I could handle a discord right now. Maybe in the future when I have more time I could

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

      @@BroCodez Even if you don't have time, the thing is, with Discord, someone in the community may have an answer to our concern. We just need real-time interactions, sometimes, for very few specifics problems that do not necessarily need a video to be made for. Hope you understand.

  • @cdjosh3568
    @cdjosh3568 4 года назад +1

    Lets goooo!

  • @theinthanzaw3069
    @theinthanzaw3069 28 дней назад

    Thank bro

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

    If you had a second method in garage to park motorcycles, you would have it call a motorcycle object as well but both would exist within garage, correct?

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

    Thank you Bro

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

    thanks bro 🙏

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

    Thank you very much

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

    thank you my Bro ♥♥♥

  • @keler50213
    @keler50213 9 дней назад

    nice!

  • @JakubFischer-hm4re
    @JakubFischer-hm4re 2 года назад

    love you broski

  • @anatolisavin3155
    @anatolisavin3155 3 года назад +11

    my friend, will you ever teach spring ? java for web. I'm willing to pay you for a course like that. create a patreon !

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

      Yeah!!

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

      This! Please! I'd gladly pay for a Spring course from you!!!

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

      How to contact the instructor, is he having a website

  • @augischadiegils.5109
    @augischadiegils.5109 4 года назад

    Nicee!!

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

    Very good thank you!

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

    Thanks, Bro!

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

    Great job!

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

    king

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

    Object passing
    Passing an object as an argument to a method
    public class Main
    {
    public static void main(String[] args) {
    Warehouse warehouse = new Warehouse();
    Commodity commodity1 = new Commodity("corn");
    Commodity commodity2 = new Commodity("soya bean");
    warehouse.stock(commodity1);
    warehouse.stock(commodity2);
    }
    }
    ****************
    public class Warehouse{

    void stock(Commodity commodity){
    System.out.println("The "+commodity.article+" is stocked in the warehouse");
    }
    }
    *********
    public class Commodity{
    String article;
    Commodity(String article){
    this.article = article;
    }
    }

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

    thanks bro

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

    well explained!

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

    Understood with using integers. 32th. Thank you, ma Bro Sensei!

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

    Thanks Bro

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

    ThanksBRO

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

    for the algorithm

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

    thank you so much ❤

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

    gerade vid as always

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

    Thank you so much sir.

  • @AbhishekSingh-tf6sx
    @AbhishekSingh-tf6sx 2 года назад

    Yeah Bro !

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

    ❤️🙌👌

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

    Thanks, bro.

  • @user-xe8vl9eh9l
    @user-xe8vl9eh9l 3 года назад

    your voice is very clear which software and mic do you use for recording videos

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

    Thanks Bro Code!

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

    thank you bro

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

    thanks

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

    Thank you

  • @Ace-le7ld
    @Ace-le7ld Год назад

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

    thx bro 🤙

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

    the examples in the video. Could it be called injection dependency?

  • @JouriSaid505
    @JouriSaid505 2 дня назад

    thankk you smmmmmm

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

    how the non static method worked in a static class???
    the method bark in the class main

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

    gg

  • @W3r3-w0lf
    @W3r3-w0lf 2 года назад +1

    Bro what is benefit of passing object to a method in actual programming? is it for placing some data then using them later ? is it relevant to Data binding?

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

      I believe this is just a simple way of explaining how it works, later on the objects getting passed are entered via user input

    • @W3r3-w0lf
      @W3r3-w0lf 2 года назад +2

      @@sahirbadr8901 I get it i've completed java Gui and oop now I realize why do we use it, it has several benifits in polymorphism aggrigation and downcasting classes and in relationships between classes, reduces creating object in method only we pass reference to method for memory complexity avoiding redundancy.
      That was 4 month ago nearly 5, I had no clue what was object and passing via parameters

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

      @@W3r3-w0lf thanks for telling me, I didn't even know that!

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

    Thanks

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

      thank you for watching Azlee!

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

    🚘

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

    You didn't discussed technicalities..what happens behind the scene..😊

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

    👍

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

    Thanks, Bro 06/08/2024

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

    thank you.

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

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

    I am a fellow bro !

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

    ty

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

    learnt but can rewatch

  • @saul-gone-z3o
    @saul-gone-z3o 4 года назад

    What's the difference between these two initialized variables?
    public int age;
    int age;

    • @whoami-dt8vo
      @whoami-dt8vo 3 года назад +9

      Both of these are not initialized they are just declared. I guess what u wanted to ask was access modifiers.
      "int age" is default access modifier which means it can be used inside the package where it was declared.
      Whereas "public int age" means it can be used outside the package and pretty much any where else.
      I hope this answers your doubt.

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

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

  • @ap1136-c4m
    @ap1136-c4m 9 месяцев назад

  • @MusaKhan-rn3mn
    @MusaKhan-rn3mn 4 года назад +1

    THANKS BRO LY

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

      Luv U 2 NO HOMO

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

      Bro Code is my love! I will fight you for him ⚔

  • @nikleduc1158
    @nikleduc1158 4 года назад +1

    I'm subscribed to you on three different accounts (school, "work" and normal)
    I am your biggest SIMP

  • @zaidiimade6608
    @zaidiimade6608 5 дней назад

    car two park on that garage

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

    Anyone know why he doesn’t have to put public in the constructors?

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

    need new videos!

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

    Ένα ακόμα σημαντικό μάθημα για τα αντικείμενα στη Java.

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

    1

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

    :)

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

    Hi

  • @vineethv37
    @vineethv37 10 месяцев назад +1

    Hey YOU 🫵