Java Tutorial: Method Overloading in Java

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

Комментарии • 1,9 тыс.

  • @hsetips2574
    @hsetips2574 2 года назад +108

    Now 32 out of 113.... 😊
    Notes + video + explaination in easiest way = No doubt all clear
    👍👍👍❤️🙏

  • @nayanrajchalisha4736
    @nayanrajchalisha4736 Год назад +77

    It's been 38 days since I have started learning, some days were too difficult for me to concentrate but still I'm on the go untill I finish this whole playlist and anyone learning or has just started or whoever gonna start in future, we all gonna make it. Take rest, take your own time but don't quit.

    • @SandipanSom
      @SandipanSom Год назад +3

      bro how much have u covered ?

    • @mrunknown855
      @mrunknown855 Год назад +5

      u watched just 0.77 video per day?

    • @jatindubey7892
      @jatindubey7892 Год назад +9

      @@mrunknown855 its about consistency ; consistency is not everyone's cup of tea !!

    • @AshishKhetwal
      @AshishKhetwal 7 месяцев назад +1

      @@jatindubey7892 true in starting i was watching 5-6 videos daily and now I can't sit for one video but still trying to be consistent atleast

    • @SAUMYASAHU-n9j
      @SAUMYASAHU-n9j 5 месяцев назад +3

      did u start java as your 1st programming language? In which year rn?

  • @dorababuarig765
    @dorababuarig765 4 года назад +78

    Call by value vs call by reference is clearly explained.
    Thankyou Harry bayya ❤️

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

      Time stamp?

    • @DK-js8cz
      @DK-js8cz Год назад +3

      @@parinkoralwala3653 case1 explains the call by value concept and case 2 explains call by reference concept bro.15:00

  • @Yogiiii__
    @Yogiiii__ 2 года назад +14

    Wow!!!!... Amazing Harry bhai.. All concepts cleared. I came here after listening so called paid course lectures.. You are doing amazing work.. i have taken printouts of all your notes & they are helping me a lot while doing this java course. God bless you Harry bhai..!

  • @hwaiting3573
    @hwaiting3573 3 года назад +80

    11:45 Change function will update the value of arr at index 0 because when we pass array to function/method it will actually pass the address of the value , therefore it is call by reference and it will definitely change the value of array at index 0 and print 98

    • @karthikramkoru
      @karthikramkoru 9 месяцев назад +2

      Tq bhai now I understood

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

      thanks bhai.😇

    • @TabraizKhan-iv1cl
      @TabraizKhan-iv1cl 5 месяцев назад +2

      If thats the case then for the integer , we passed x which is reference for 45 ,shouldn't a get x and x is the address of 45 so it should change based on your logic right..? I listened to it many times but couldn't understand it properly. I would appreciate you if you could elaborate it for me

    • @bothighlights4179
      @bothighlights4179 5 месяцев назад +1

      @@TabraizKhan-iv1cl suppose you have an array which is array1 = {1,2,3,4} and have a variable, int x = 6
      so if you print the variable x it will give you 6 : system.out.println(x) = 6
      and when you print the array it will give you the address of the array like this : [I@4517d9a3
      so when you're passing x (int variable) in a method the thing you're passing is 6, because x = 6 you are not passing the address or reference of int x
      but when you're passing an array you are not passing the integers in array but the address of the array : [I@4517d9a3
      and because you're passing the address of array the method is changing the actual array not a copy.
      in int x = 6 case you are passing 6 not the address of x that's why it is changing the copy not the actual x
      I hope you understood i can further help you if you didn't understand

  • @codemc7376
    @codemc7376 2 года назад +9

    I respect your notes and also appreciate you hard work. I try my 100% to learn java and till now I understand all things. 23:33

  • @madhursikarwar8531
    @madhursikarwar8531 4 года назад +33

    I never thought That I will Be knowing this much number of Programming langugae.... You are my true programming teacher. I never used to think That I will become a that sort of programmer . Thanks a lot Harry Sir ....May you get 100 Billion Subscribers and Views .. I have a wish to meet you one day 😀😀 and Sir pls bring Constructors fast

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

      @CodeWithHarry Thanks for hearting My comment sir

    • @arnavarora3607
      @arnavarora3607 3 года назад +5

      Means that every person on earth should subscribe with 15 accounts

    • @for.you.tube.
      @for.you.tube. Год назад +4

      @@madhursikarwar8531 wapas le liya heart lmao

  • @harilalchauhan9069
    @harilalchauhan9069 2 года назад +4

    Harry I usually refrain from putting up comment... But Your explanation is spectacularly awesome......that i couldn't stop myself to praise your way of teaching.... I LOVE YOU BROTHER

  • @rickk3300
    @rickk3300 3 года назад +13

    The concepts of call by value and call by reference are perfectly clear now..❤️❤️❤️

    • @TabraizKhan-iv1cl
      @TabraizKhan-iv1cl 5 месяцев назад

      so what happens actually if you call by value, copy of value is taken and then..?
      He said that it is no different from what happened to array .

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

      @@TabraizKhan-iv1cl yes, in call by value, copy of value is taken. Arrays in Java are always created in the heap memory. When an array is passed to a method, it is always passed as a reference, the array will not be copied, two variables will refer to the same array.

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

    video Number 32 11:57 Not Change in Actual Array
    Thank You Harry Bhai For Lunch java Best Course 😊🙏🙏🙏🙏

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

    Hello sir, your teaching style is awesome. I am beginner but after watching your tutorials I have created my hobby as a android dovelopper. So thanks a lot sir for providing these good stuff for beginners.

  • @HarshKumar66743
    @HarshKumar66743 Год назад +6

    At 12:05 it will print " 52 ", because even though the method has changed the copied value but has not returned it to the main function.

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

    I have seen all your c and c++ playlist videos good going dude
    And thanks a lot for helping collage students like me from these videos

  • @IshmeetSinghBaweja
    @IshmeetSinghBaweja 2 года назад +6

    His notes are really outstanding and very much helping + perfect !

  • @anonymoususer4148
    @anonymoususer4148 4 года назад +9

    Thank you for teaching us so nicely. You're the best programming teacher on youtube

  • @IshmeetSinghBaweja
    @IshmeetSinghBaweja 2 года назад +9

    Really, His work is very much appreciable! and he deserves much more than what he is getting now.
    Greatest teacher ever!
    I have no words to define you.
    Salute, Brother.

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

    harry bro you are amazing like institutes are teaching those courses like java,c++,python etc for 5000rs (approx)per month and you are teaching us for free amazing brother you are my guru ❣💖

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

    You are my true programming teacher.

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

    In the example of (12:00), *value* is changed because "array" is not a primitive data type.
    (Harry said it previously that, this happens with primitive data types only).
    Same thing happens in integer as well as array, but in case of array only the reference is copied. Hope you are getting the point!
    It's alright if you got it wrong. Even I got it wrong at first 🙃

    • @zainabkazi4102
      @zainabkazi4102 Год назад +3

      i rewind the video thrice but still not able to understand the difference in call by value n call by reference

    • @atifasadkhan
      @atifasadkhan Год назад +4

      @@zainabkazi4102
      inshort the value changed for variables because they are premetive data type
      but array is not premetive data type so you were able to change !!!
      premetive data types are (Boolean, char, byte, int, short, long, float, and double.)

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

      ​@@atifasadkhanbut we can change the value of primitive data type through call by reference.

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

    @codewithharry sir apke video dekh kar aisa lagata hai ki aapse behtar coding me to koi nhi lagata hai 🤟🤟🔥🔥💯💯💯💯🔥🙏

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

    I have learnt this but I was not this much clear with it thanks to you .Now I know the logic behind method and method overloading

  • @kanavatri267
    @kanavatri267 4 года назад +282

    Hey Harry,you’re doing an awesome job .Keep up the good work and best of luck for future !Love from Melbourne ,Australia .

  • @khushichaudhary9555
    @khushichaudhary9555 11 месяцев назад +1

    You are doing a great job. Thanks to you I am getting better day by day in coding.

  • @roxyisthebestwaifu712
    @roxyisthebestwaifu712 Год назад +3

    12:07
    It will print 98.
    The value of array is changed because the reference of array is passed to the function. It didn't change during the integer because while passing an integer, the value was passed to the method.

    • @TabraizKhan-iv1cl
      @TabraizKhan-iv1cl 5 месяцев назад

      How is that same case then. He said it in the video that for integer it is no different compared to arra

  • @sahilgupta7001
    @sahilgupta7001 2 года назад +5

    11:52 the value of marks[0] will be changed because the address of the array will be passed in the function and all the changes will be reflected in the original array

  • @harshitverma2809
    @harshitverma2809 3 года назад +7

    12:05
    Value of marks[0] is 98.
    So '98' will be the output

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

    thamk you very much harry bhai love you a lot
    bcz of you i am more motivated in coding and started to love java

  • @karthikt3957
    @karthikt3957 Год назад +3

    11:50 the value at index 0 gets changed as whenever array is passed , array referrences are passed changing the value formally as well as in main method

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

    your way of teaching is exceptional

  • @abheygupta2332
    @abheygupta2332 4 года назад +17

    11:48
    Sir I think the value will change cuz I learned in your C in one video that in case of passing an array, the address is passed which is capable of changing the value of an array
    Baaki pata ni😅😅😅😅

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

    sir ,your lecture is very benifical and important for me
    thank you Harry sir

  • @Dxiag123
    @Dxiag123 4 года назад +15

    Great. Harry Bhai, you always make a smile on our face everytime. This revolution is going to be legendary.🙇🏻‍♂️🙇🏻‍♂️

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

    Thanka for coding classes you are the best programming teacher

  • @amitghanwat8625
    @amitghanwat8625 3 года назад +5

    Great course! Thanks for the efforts Harry!

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

    apki mahanath or lagana ko 21topko ki salaamii.sir jeee ☺️☺️☺️🙌🙌🙌,
    hame kuch sikhe ya ni sikhe ye baat alg hai par apki mahnath hi hame bhot kuch shikha de gi ,
    padane ka trika to dassuuu hai.sir aapka 👌👌👌☺️☺️☺️,
    bhot zor, bhot tagda , katay aagg 🙌🙌🙌🙌🙌🙌c++, java , python all vedio ara amazing 👌👌👌

  • @bhupeshpattanaik7150
    @bhupeshpattanaik7150 4 года назад +6

    Harry bhai .... DS ke playlist ko continue karo please
    DS
    DS
    Ds
    DS
    DS

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

    best java coding lectures on youtube ☺☺

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

    @harry 21:44
    You said method overloading cannot be performed by chnaging the return type but in your source code site you have mentioned it can be perfomed by changing the return type. Please clear the confusion.

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

    bahut badhiya feel aa rahi hain using this theme😍😍

  • @cuberkam9072
    @cuberkam9072 4 года назад +4

    Refrigerators Walla example and new theme of intelliJ mast hai bhai😊😊

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

    20.22 : "Arguments are actual "
    Ye line kisi ne mujhe batai thi or ye mere dimaag m baith gyi thi.............This exact same line I'm gonna tell to my younger brother and sisters .🤩🙌

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

    This course is very good :)

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

    Harry Bhai, mein bhi sirf ap sa hi Java seekh rha hon, apka lecture awesome, understandable and best in all aspects ha, mjhe bhi aik Dil do❤❤❤❤

  • @harrapanman621
    @harrapanman621 2 года назад +27

    Y O U A R E L E G E N D

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

    Here is pro level explained java❤
    Thank you harry bhaiya

  • @ayushdeveloper
    @ayushdeveloper 4 года назад +10

    Sir please Artificial intelligence , machine learning,data science pe ek course banaiye with mathematics 🙏🙏🙏

    • @saturn-6-66
      @saturn-6-66 4 года назад +1

      Yes sir

    • @musiciantirth3710
      @musiciantirth3710 4 года назад +2

      ML Ka To Hai

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

      @@musiciantirth3710 But ML with basic to high mathematics I mean a separate course of mathematics for ML and AI with basics of python modules necessary for ML and AI

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

      Yeah

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

    Your Notes are the best.. Short and crisp.

  • @sujatajena267
    @sujatajena267 4 года назад +12

    11:45 Haan bhai change hoga kyunki agar nahi hota to aap ye nahi karwate 🤣🤣🤣 it will print 98

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

      sahi bole bhai or aapne is comment ko edit kiya hai

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

      @ sujata Jena aap jabhi bhi meri pehlli comment read karoge to mujhe reply bhejo

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

    11:45 It will change the value of array at index 0 because you said it will pass the reference of array rather than passing copy of the original array.

  • @Shivam-si6pn
    @Shivam-si6pn 4 года назад +4

    HARRY BHAI APKI PYTHON 15 KI VIDEO ME **NOTES NAHI DOWNLOAD HO RAHA HAI**PLEASE KUCH KARIYE
    IT'S VERY IMPORTANT PLEASE 🙏🙏

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

    you are god for coding students.....

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

    Itna sub Kuch krna ka bad . Harry bi ap sirf like ka kata hu. Thanks yar
    . Sir tuse great hu. 👍👍👍👍👍👍👍👍👍👍👍👍👍👍👍👍👍🎧👍❓👍👍👍👍👍👍👍👍👍👍👍👍👍

  • @RehanAliArman-mt8pr
    @RehanAliArman-mt8pr 8 месяцев назад

    Mr.Harry, I am watching your java playlist. Its is very helpful and easy to learn. love from Skardu, Pakistan.🥰🥰😍

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

    you are a such hardworking teacher, thanks a lot!

  • @sabaasifkhan2288
    @sabaasifkhan2288 18 дней назад

    than you sir you are such a great teacher better than uni teachers

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

    You are really a good tutor!! THANK YOU HARRY

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

    Best Java Course Ever!

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

    Learning java
    our efforts 20 %
    harry sir putting efforts 80%

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

    11:51 Yes the value will change...
    As we are passing the name of array which is actually the base address of the array

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

    7:43 thanks for solving our confusion.🤗🤗🤗🤗🤗

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

    It's like finally I found you. Thank you 🙏.

  • @MdSamir-hv2kr
    @MdSamir-hv2kr 2 года назад +1

    Thank you very much for your great lectures

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

    11:46
    Output:
    The value of x after running change is: 98
    Reason:
    Because Here in case of array the reference of array is pass thus it can change the value of arr[0]

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

    Thank you Harry Bhai 🙂 dil se. I got all the concepts easily

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

    Thank you for being so kind to the community 😊😊

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

    Thank you so much bhai !!!!! Great video ,mera kal exam hai yeh dekh ke bhot sikha mene

  • @AmarjeetKumar-mj9iq
    @AmarjeetKumar-mj9iq Год назад

    In simple terms when you create a array with a variable ,the variable get the address of the first index of that array. and when you pass the array the same address is send to method so changes done are permanent and effect the original copy.

  • @arodiyarijvan
    @arodiyarijvan 9 месяцев назад +1

    thanks harry bhai for explain method of overloding 💯💯💯💯💯💯💯💯💯💯💯💯💯💯

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

    for personal understanding:
    When a primitive data is passed to a method in this case a copy of the primitive data is made and any changes that happen inside the method affect the copy and not the original primitive data due to this we will not see any change in the original primitive data however in terms of object the reference of the object is passed in the method and not the original object itself due to this a copy of the reference is made in the method and not a copy of the object. Now, since the original reference of the object actually pointed to the address of the object, the copy that is made in the method i.e. the copied reference; this reference will also hold the same address in it. Since both references point to the same address, due to this any changes that are made in the copied reference end up affecting the actual object.

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

    Thank U sir for providing this wonderful video with notes❤

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

    I like his videos even before watching it ❤️

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

    Thank you so much Harry ! You are doing great ☺️

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

    Harry Bhai your teaching techniques are awesome!!!

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

    thanks harry for making this topic so easy .

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

    11:48 marks 0 value is not change because marks is pass copy value (It is also known as call by value )

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

    Yes we are able to understand.........
    Harry....

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

    Hello Harry!! You are doing such an amazing job, thanks for all your guidance.

  • @vaibhavshinde-wb9wb
    @vaibhavshinde-wb9wb 7 месяцев назад

    thanks bro for teaching in very easy words .

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

    Thanks for your videos ..dimaag ki batti jalni 💡 start ho gyi hai

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

    11:56 The function will update the value and print 98

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

    Time 11:56
    Output
    The value of X after running change is : 98

  • @RehanAliArman-mt8pr
    @RehanAliArman-mt8pr 8 месяцев назад

    thank you so much for giving us your time.

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

    11:51 change hoga harry bhai!

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

    You should start your own college of coding.
    Great knowledge 🙏

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

    I love your handwritten notes.

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

    Ha Harry Bhaiya sab concepts samajh aa rahe ha.

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

    you are wonderful Teacher harry

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

    Thankyou harry sir your great teacher respect++...

  • @DK-js8cz
    @DK-js8cz Год назад

    Method overloading can also be performed by changing the return type of methods, but you have to change the type of parameters also.
    public class Main {
    static int plusMethod(int x, int y) {
    return x + y;
    }

    static double plusMethod(double x, double y) {
    return x + y;
    }

    public static void main(String[] args) {
    int myNum1 = plusMethod(8, 5);
    double myNum2 = plusMethod(4.3, 6.26);
    System.out.println("int: " + myNum1);
    System.out.println("double: " + myNum2);
    }
    }

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

    👍NICE VIDEO...... THIS JAVA PLAYLIST HELP ME A LOT.... THANKS HARRY BHAI....

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

    Thanku u sir ...u are real guru ❤️

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

    Thanks for explaininng clearly in short videos. I''ll watch all videos in your JAVA playlist. Can you make a playlist for DBMS too it will be very helpfull.

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

    11:59
    output:- 98

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

    Yes sir i value your notes very much

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

    11:48 yes it change value because of call by referring because I already know c language

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

    12:05 yes it will as array is kinda like pointer.

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

    For primitive data type - Methode Called by value.
    For Object/ Non primitive data type- Methode Called by reference/address.

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

    watching this playlist in 2024 and this playlist is still worth watching

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

    12:07
    the value of arr[0] will be change to 98 from 52.

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

    mindblowing harry bhai