Java object passing 🏬

แชร์
ฝัง

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

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

    //**********************************************
    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 ปีที่แล้ว +6

    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 ;)

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

    nice explanation.
    Thanks for the videos.

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

    Easy to understand this is what i need 👍

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

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

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

    Great explanation!Thank you

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

    Thanks, Bro! ☕ You're awesome!

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

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

    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 หลายเดือนก่อน

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

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

    Another simple example, thanks.

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

    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

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

    clear, concise. Liked.

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

    Awesome teacher

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

    you are the absolute best bro. i love you bro

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

    nice vid very good explanation

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

    Great job!

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

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

  • @user-id3qp7bq9o
    @user-id3qp7bq9o 3 ปีที่แล้ว +1

    Well explained! Bro

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

      thanks for watching Codle

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

    Channel name is beautiful 👌🙏🏻

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

    Very good thank you!

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

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

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

    well explained!

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

    great explination

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

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

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

      thanks Nik!

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

    Thank you so much sir.

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

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

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

    Thanks, Bro!

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

    thank you my Bro ♥♥♥

  • @DudeWhoGames
    @DudeWhoGames 3 ปีที่แล้ว +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  3 ปีที่แล้ว +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

    • @gervinho506
      @gervinho506 2 ปีที่แล้ว +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.

  • @augischadiegils.5109
    @augischadiegils.5109 3 ปีที่แล้ว

    Nicee!!

  • @iamTHIEN013
    @iamTHIEN013 2 หลายเดือนก่อน +1

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

  • @JakubFischer-hm4re
    @JakubFischer-hm4re ปีที่แล้ว

    love you broski

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

    Bro is just a lifesaver

  • @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 2 ปีที่แล้ว

      How to contact the instructor, is he having a website

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

    Thanks, bro.

  • @pa-305
    @pa-305 3 ปีที่แล้ว

    Best broooo

  • @user-zq6yx7of5f
    @user-zq6yx7of5f ปีที่แล้ว

    Thank you very much

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

    thanks bro 🙏

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

    Thank you Bro

  • @user-xe8vl9eh9l
    @user-xe8vl9eh9l 2 ปีที่แล้ว

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

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

    ❤️🙌👌

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

    easy to understand

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

    NIce.

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

    Lets goooo!

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

    lets go bro

  • @JFErikson
    @JFErikson ปีที่แล้ว +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?

  • @AbhishekSingh-tf6sx
    @AbhishekSingh-tf6sx ปีที่แล้ว

    Yeah Bro !

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

    Thanks Bro Code!

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

    thanks bro

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

    thank you bro

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

    ThanksBRO

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

    Thank you

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

    nycc

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

    thx bro 🤙

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

    👍

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

    thank you.

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

    gerade vid as always

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

    Nice

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

    nice

  • @Ace-le7ld
    @Ace-le7ld ปีที่แล้ว

  • @MrLoser-ks2xn
    @MrLoser-ks2xn 2 ปีที่แล้ว

    Thanks

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

    thanks

  • @Skyland_200
    @Skyland_200 18 วันที่ผ่านมา

    king

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

    ty

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

    gg

  • @joyceasante8292
    @joyceasante8292 ปีที่แล้ว +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;
    }
    }

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

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

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

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

  • @Balen-Ahmed
    @Balen-Ahmed ปีที่แล้ว +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 ปีที่แล้ว

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

    • @Balen-Ahmed
      @Balen-Ahmed ปีที่แล้ว +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 ปีที่แล้ว

      @@Balen-Ahmed thanks for telling me, I didn't even know that!

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

    I am a fellow bro !

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

    for the algorithm

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

    learnt but can rewatch

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

    Thanks, Bro 06/08/2024

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

    🚘

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

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

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

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

    need new videos!

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

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

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

    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.

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

    :)

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

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

  • @MusaKhan-rn3mn
    @MusaKhan-rn3mn 3 ปีที่แล้ว +1

    THANKS BRO LY

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

      Luv U 2 NO HOMO

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

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

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

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

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

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

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

    where da porsche

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

    Hi

  • @JanniceDatingaling
    @JanniceDatingaling 24 วันที่ผ่านมา

    can't understand TwT

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

    Hey YOU 🫵

  • @AARTIKUMARI-fe8wx
    @AARTIKUMARI-fe8wx ปีที่แล้ว

    vedio 32

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

    comment

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

    Thanks Bro

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

    👍

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

    Thanks

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

      thank you for watching Azlee!

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

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

    comment