Java object passing 🏬

Поділитися
Вставка
  • Опубліковано 6 січ 2025

КОМЕНТАРІ •

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

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

  • @millejadecabrera4544
    @millejadecabrera4544 3 роки тому +4

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

  • @pradeepg4498
    @pradeepg4498 2 роки тому

    Channel name is beautiful 👌🙏🏻

  • @sabaasifkhan2288
    @sabaasifkhan2288 Місяць тому

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

  • @kalyaniv2863
    @kalyaniv2863 Рік тому +1

    Great explanation!Thank you

  • @yellowhellow-wi9gi
    @yellowhellow-wi9gi 2 місяці тому +1

    thank you bro you are a life saver

  • @anasibrahim6548
    @anasibrahim6548 3 роки тому

    great explination

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

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

  • @varunsai4222
    @varunsai4222 2 роки тому

    nycc

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

  • @salvadego7834
    @salvadego7834 2 роки тому

    nice

  • @danny.3036
    @danny.3036 3 роки тому +1

    Thanks, Bro! ☕ You're awesome!

  • @vithuhavoc2056
    @vithuhavoc2056 3 місяці тому

    Thank you so much Sir ..

  • @armaulan
    @armaulan 3 роки тому

    easy to understand

  • @mryoloTHEgreek
    @mryoloTHEgreek 9 місяців тому

    lets go bro

  • @eugenezuev7349
    @eugenezuev7349 8 місяців тому

    Bro is just a lifesaver

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

  • @tamekkaknuth9612
    @tamekkaknuth9612 2 роки тому

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

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

  • @Devmini_Weerasinghe7613
    @Devmini_Weerasinghe7613 Рік тому

    thanks bro 🙏

  • @brauliosxd
    @brauliosxd Рік тому +1

    Thank you Bro

  • @曾毓哲-b1t
    @曾毓哲-b1t Рік тому

    Thank you very much

  • @_7.T_
    @_7.T_ 4 роки тому

    thank you my Bro ♥♥♥

  • @keler50213
    @keler50213 10 днів тому

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

  • @TheEvertonDias
    @TheEvertonDias Рік тому

    Thanks, Bro!

  • @fargetti5385
    @fargetti5385 2 роки тому

    Very good thank you!

  • @Skyland_200
    @Skyland_200 6 місяців тому

    king

  • @mauxcbr4879
    @mauxcbr4879 3 роки тому

    Great job!

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

  • @cate01a
    @cate01a 4 роки тому

    well explained!

  • @matinmonshizadeh
    @matinmonshizadeh 3 роки тому

    thanks bro

  • @honoredegg
    @honoredegg 2 роки тому

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

  • @developerjunior446
    @developerjunior446 4 роки тому

    Thanks Bro

  • @shdkdelllp9985
    @shdkdelllp9985 2 роки тому

    ThanksBRO

  • @misterwiggles8771
    @misterwiggles8771 2 роки тому +1

    for the algorithm

  • @gentle9964
    @gentle9964 Рік тому

    gerade vid as always

  • @smwalez7196
    @smwalez7196 2 місяці тому

    thank you so much ❤

  • @AbhishekSingh-tf6sx
    @AbhishekSingh-tf6sx 2 роки тому

    Yeah Bro !

  • @minhtetpaing1695
    @minhtetpaing1695 3 роки тому

    Thank you so much sir.

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

  • @sebysurfer
    @sebysurfer Рік тому

    thx bro 🤙

  • @Ace-le7ld
    @Ace-le7ld Рік тому

  • @quanlien8017
    @quanlien8017 Рік тому

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

  • @JouriSaid505
    @JouriSaid505 2 дні тому

    thankk you smmmmmm

  • @sudeshsachintha5737
    @sudeshsachintha5737 2 роки тому

    gg

  • @omerabdelraheem964
    @omerabdelraheem964 2 роки тому

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

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

  • @alialhussain4139
    @alialhussain4139 7 місяців тому

    Thanks, Bro 06/08/2024

  • @oguzhantopaloglu9442
    @oguzhantopaloglu9442 4 роки тому

    👍

  • @TWVVermin
    @TWVVermin 2 роки тому

    thank you.

  • @alexyakoveno4682
    @alexyakoveno4682 2 роки тому

  • @dalv8749
    @dalv8749 Рік тому

    ty

  • @akhileshsohotoo4428
    @akhileshsohotoo4428 Рік тому

    I am a fellow bro !

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

  • @eugenelichen1435
    @eugenelichen1435 Рік тому

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

  • @zaidiimade6608
    @zaidiimade6608 5 днів тому

    car two park on that garage

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