Primitive Types and Reference Types in Java

Sdílet
Vložit
  • čas přidán 26. 07. 2024

Komentáře • 136

  • @egehurturk6209
    @egehurturk6209 Před 3 lety +100

    This was the best explanation of Reference types I've ever watched. This was awesome. Thank you

  • @mr.shuklashukla3259
    @mr.shuklashukla3259 Před 4 lety +20

    You are the greatest teacher ( who teach us free on CZcams ) ,ever in the youtube , for teaching java . 😍

  • @shivambhardwaj3273
    @shivambhardwaj3273 Před 2 lety +2

    Crisp, clear, to the point!!
    Hats off Neso Academy for making learning so efficient!

  • @hakancemgercek
    @hakancemgercek Před rokem +8

    Perfect explanation for an important topic. Even in some university lectures, the professors can't explain these things like you do. I already knew these things but the way you tell about them is just impressive. Thanks for your efforts. Great work.

  • @rahulkm3459
    @rahulkm3459 Před 2 lety +5

    At the end of every video u say Thanks for watching 😊 but I have to say Thank you 😊 for making this tutorial...
    Really Helpful 🙏

  • @YeeWaiyau
    @YeeWaiyau Před rokem +3

    Have been struggling with the idea of reference variable and this amazing videos clear my doubts!!!

  • @dikatsogaleboe3640
    @dikatsogaleboe3640 Před 3 lety

    This made things so much clear. Thank You!

  • @gamer-zy1uj
    @gamer-zy1uj Před 2 lety +4

    This is really best lecture on primitive and reference types.Nobody can explain like this.Thankyou sir for this amazing series🔥🔥🔥🔥🔥😊

  • @jonathanelmoznino3995
    @jonathanelmoznino3995 Před 3 lety +2

    Really great explanation and was very clear and on point. Thank You :)

  • @mingillee3760
    @mingillee3760 Před rokem

    What a clear explanation!! You saved my time!! I appreciate it

  • @maries.8809
    @maries.8809 Před 8 měsíci

    Thank you so much for this! I have always said that boxes makes my learning easier, and in this case it was definitely true. I have been struggling to understand how reference types work in Java and this video made me understand it.

  • @whatsapwhatsapp662
    @whatsapwhatsapp662 Před 4 lety +1

    THANK YOU SO MUCH DEAR Lecturer for this good explanation and easy to understand videos. you are a genious. bless

  • @akashmohite3075
    @akashmohite3075 Před 2 lety +1

    Energetic explanation that helps to understand the concept

  • @mashapimatimba8063
    @mashapimatimba8063 Před 4 lety +1

    You are a life saver man. Big ups!

  • @noumanrussel1112
    @noumanrussel1112 Před 6 měsíci

    Amazingly done! Hats off

  • @jensjux4747
    @jensjux4747 Před 3 lety +9

    gj man. Why cant university teachers explain it like this

  • @NewLondonMarshall
    @NewLondonMarshall Před 2 lety

    Fantastic video, thank you!

  • @aniketdeepeju0229
    @aniketdeepeju0229 Před rokem

    Thanks for making such conceptual videos.

  • @khaledadel2034
    @khaledadel2034 Před rokem +5

    please note that non-primitive types do not store their values in stack they only store the reference in the stack and that reference will be connected to a random part inside "heap" , the heap will contain the value of that reference

    • @farzin818
      @farzin818 Před 9 měsíci

      The reference address is stored in the stack(which contains the address/pointer) and its contents in the heap?

    • @suswithcherry9252
      @suswithcherry9252 Před 6 měsíci

      @@farzin818 yes

  • @soujanyavt
    @soujanyavt Před 4 lety

    Nicely expained. Thank you so much

  • @npl7740
    @npl7740 Před 9 měsíci

    Great Explaination.
    Thank You.

  • @v.charanveerabathini808
    @v.charanveerabathini808 Před 4 lety +4

    Nice explanation

  • @Omenemperor2
    @Omenemperor2 Před 3 měsíci

    Thanks for this informative videos!

  • @aakashtiwari3677
    @aakashtiwari3677 Před 3 lety

    Best explanation !!! Thank You

  • @jeanjulmis2347
    @jeanjulmis2347 Před 8 měsíci

    Great explanation!

  • @arlunguakh8661
    @arlunguakh8661 Před rokem

    thank u so much! i was struggling to understand the difference but u explained it really well

  • @monjasonsteng7861
    @monjasonsteng7861 Před 6 měsíci

    This was great. Thank you.

  • @mohamedmahmoud-bw8vb
    @mohamedmahmoud-bw8vb Před 4 lety

    you are explaining with Abbreviated and awesome way 👍👏

  • @bipashajotwani7944
    @bipashajotwani7944 Před 3 měsíci

    This is an amazing explanation!

  • @Kalai_vaniG
    @Kalai_vaniG Před 2 lety

    Thanks for the explanation... ✨

  • @nouhatamba9976
    @nouhatamba9976 Před 3 lety

    thank you soo much its so well explained good continuation

  • @extems7895
    @extems7895 Před 3 lety

    Excellent explanation!!

  • @darshanamadushan1142
    @darshanamadushan1142 Před 2 lety

    Great explanation. keep it up!

  • @zahramahdavi9448
    @zahramahdavi9448 Před rokem

    I watch so many videos and you are the best , I really understood the topic

  • @ashmitverma5612
    @ashmitverma5612 Před 3 lety +1

    My teacher is refering this vid and presenting it, Thank You!

  • @thrifterspoint1002
    @thrifterspoint1002 Před 3 lety +2

    nice concept u share;

  • @p3t357
    @p3t357 Před 3 lety

    You're amazing teacher. I watched few movies on CZcams and I don't understood nothing. Thanks!!!.

  • @Sulerhy
    @Sulerhy Před 4 měsíci

    This was the best explanation. I like it.

  • @akshitsingh5108
    @akshitsingh5108 Před 2 lety

    The best explanation ever.

  • @rt7687
    @rt7687 Před 11 měsíci

    Excellent class as usual

  • @Dankake23
    @Dankake23 Před rokem

    Very clear, thank you my friend)

  • @anuragtiwari6910
    @anuragtiwari6910 Před 2 lety

    The best explanation ever....

  • @sing.along.with.ananya

    Thank you so much you explained it so easily

  • @luqmannulhakiem4519
    @luqmannulhakiem4519 Před 3 lety

    very good explaination!

  • @mohamedthoufeeq375
    @mohamedthoufeeq375 Před 2 lety

    The best explanation ever

  • @vaishnavir1018
    @vaishnavir1018 Před 3 lety +1

    U r the world's best teacher sir😍😍

  • @in5125
    @in5125 Před 2 lety

    really good! thank you!!!

  • @moustafa_naguib
    @moustafa_naguib Před 2 lety

    A great explanation....

  • @vamsireddy6981
    @vamsireddy6981 Před 2 lety

    Best explanation,I am very clear about this now tq so much sir

  • @gaiedmahdi8791
    @gaiedmahdi8791 Před 7 měsíci

    very simple and objective

  • @hamzael-badaoui1736
    @hamzael-badaoui1736 Před 4 měsíci

    great explination

  • @mockingspyhd6099
    @mockingspyhd6099 Před 3 lety

    Thank you!

  • @haya_03
    @haya_03 Před 4 měsíci

    thank you so much !

  • @boqizhu4522
    @boqizhu4522 Před 2 lety

    amazing video!!!

  • @babak4952
    @babak4952 Před 3 lety +1

    Very good job

  • @dipeshsamrawat7957
    @dipeshsamrawat7957 Před 2 lety

    I love you Neso Academy. ❤️

  • @teachkhmerbinary
    @teachkhmerbinary Před rokem

    yes yes thank! for your video help in me to understand my teacher lesion.

  • @distractedbudha1859
    @distractedbudha1859 Před 3 lety

    thank you so much

  • @steff420
    @steff420 Před 3 lety

    Great video

  • @dineshm3488
    @dineshm3488 Před 2 lety

    Excellent

  • @RaviShankar-ow9pu
    @RaviShankar-ow9pu Před 4 lety +1

    Sir, can't wait to witness the neso aap !!!how much more will I have to wait???

  • @hishamkambal778
    @hishamkambal778 Před 2 lety

    thank u so much bro

  • @haribhaii04
    @haribhaii04 Před 6 měsíci

    Perfect!!

  • @kenjohnsiosan9707
    @kenjohnsiosan9707 Před 2 lety

    thank you sir

  • @mikeabordo6655
    @mikeabordo6655 Před rokem

    Thanks

  • @pointer7pl
    @pointer7pl Před rokem

    primitive should me named ---> expresion type. amd all would be clear and understable :) Thank you man ! this was very good explaination

  • @ashutoshawasthi
    @ashutoshawasthi Před 2 lety

    Bahut sahi sir ❤️🔥

  • @softwareeducation_per
    @softwareeducation_per Před 2 lety

    🙌wonderful

  • @harshbhardwaj3542
    @harshbhardwaj3542 Před 3 lety

    Thankyou

  • @s.r.shuvadev9159
    @s.r.shuvadev9159 Před 4 lety

    Awesome. But we are waiting for reamainder video in c programming and data structure series. Please sir make reamainder video as soon as possible.

  • @fire_krystal
    @fire_krystal Před rokem

    thank you thank you thank you THANK YOU !

  • @I_am_Alxui
    @I_am_Alxui Před 2 lety

    Thank u

  • @isurumadushan6774
    @isurumadushan6774 Před 3 lety

    great!!!

  • @mrglitch2982
    @mrglitch2982 Před 3 lety +1

    the best explanation

    • @user-ml9oi5rh9x
      @user-ml9oi5rh9x Před 3 lety

      Hello friend, is it possible for us to study together because I am not good at Java and cannot study on my own. Can we cooperate together?

  • @yuvrajsinghrathore1349

    Love it

  • @ivanjakic1587
    @ivanjakic1587 Před 2 lety

    Great explanation. One question, why is important to know memory location etc..theory what is Refrence types vs Primitive types?

  • @s.....8353
    @s.....8353 Před 4 lety +1

    super

  • @mohammedameer2365
    @mohammedameer2365 Před 3 lety +1

    thanks man,finaly i catch it ❤

    • @user-ml9oi5rh9x
      @user-ml9oi5rh9x Před 3 lety

      Hello friend, is it possible for us to study together because I am not good at Java and cannot study on my own. Can we cooperate together?

    • @mohammedameer2365
      @mohammedameer2365 Před 3 lety +1

      ونصيحه وانتي بتشوفي الدبلومه حلي problem solving في موقع hackerrank بالتوازي مع الدبلومه

    • @user-ml9oi5rh9x
      @user-ml9oi5rh9x Před 3 lety

      شكرا كثير

  • @ismaciilibraahim3724
    @ismaciilibraahim3724 Před 10 měsíci

    thankyo for clear explanation my teacher and i appreciate you millions times

  • @soap4890
    @soap4890 Před 2 lety

    THANKS ALOTTTTTT

  • @kingsmann_21
    @kingsmann_21 Před 3 lety +1

    Thank u very very much ......I'm suffering from this confusion for 1 month.

    • @user-ml9oi5rh9x
      @user-ml9oi5rh9x Před 3 lety +1

      Hello friend, is it possible for us to study together because I am not good at Java and cannot study on my own. Can we cooperate together?

    • @bringmygroozaaop5864
      @bringmygroozaaop5864 Před 3 lety +1

      @@user-ml9oi5rh9x ok

    • @user-ml9oi5rh9x
      @user-ml9oi5rh9x Před 3 lety

      @@bringmygroozaaop5864 fatima_khaleel001 my insta

  • @smaylomoose6447
    @smaylomoose6447 Před 4 lety +3

    Thank you very much for the explanation, I wanted to ask you for advice recently I wanted to learn how to create apps with flutter and the language it uses is dart and it's oo like java do you think I should learn java first then dart or it's best learn dart straight away?

    • @drewarocha42
      @drewarocha42 Před 3 lety

      If you just want to build apps I’d use dart, most oop languages carry the same logic with different syntax

  • @aryanraje2770
    @aryanraje2770 Před 3 lety +1

    The accent made it even more intresting.

  • @mordecai8707
    @mordecai8707 Před 3 lety +1

    I just take the course outline from my class and look for corresponding videos on NESO Academy. My professor knows I don’t show up to class and wonders how I can still pass my exams and hw 😂

  • @ErenUS21
    @ErenUS21 Před rokem

    the best...

  • @Shivam-eh5fc
    @Shivam-eh5fc Před 4 lety +1

    public class Program
    {
    public static void main(String[] args) {
    String s1="hello";
    String s2=s1;
    s2="hi";
    System.out.println(s1);
    System.out.println(s2);
    }
    }. The output is : hello, hi sir why the output is different as they reference the same String “hello”

    • @raywinter8733
      @raywinter8733 Před 4 lety +4

      Because you reassigned the value of s2. While they were both assigned to the same value, they could point to the same object in memory. But since s2 was reassigned to a different value, it had to point to a different object in memory.

  • @vigneshwaranravichandran8223

    Sir why reference type directly not store a value instead of storing a address of the value?? Pls clear my doubt?

  • @bobertren3941
    @bobertren3941 Před 3 lety

    legend

  • @parthpandya2909
    @parthpandya2909 Před 4 lety

    How to make reference variable of int?????

  • @abhishekgoswami9105
    @abhishekgoswami9105 Před 2 lety

    habibi tum nice explain karti

  • @simulink9564
    @simulink9564 Před 2 lety

    Hmm 🤔 interesting

  • @rajatsoni-07
    @rajatsoni-07 Před rokem +1

    5:30 How "hello" is getting stored in the memory without declaring a variable or a container?

    • @suswithcherry9252
      @suswithcherry9252 Před 6 měsíci

      when you instantiate a variable of type string, a string variable or container will be allocated in the memory that stores the reference of the value at the same time the value of the variable will be created in the heap memory.

  • @ledajoro6965
    @ledajoro6965 Před 4 lety

    Thank you sir for the explanation, it was very well done! I have a question but feel free to not answer it.
    In the reference type example you gave, you give us two variables "s1" and "s2". "s1" references the address location of the object string "hello" that is 1008 right? but in the case of "s2" it references the VALUE of "s1" not the address location of it, so that would make "s2" a primitive type because it references the value instead of the directory no?
    what if "s2" put in its value the address location of "s1" so that then that can take it to the "s1" value and since now the "s1" value is the string location "hello", the program finally take us to the string location "hello". is that possible?

    • @rubendariofrancodiaz6944
      @rubendariofrancodiaz6944 Před 4 lety +1

      Both s1 and s2 references to the address location of the value which is 1008. None of them are referencing an actual value. About the second part, Java doesn't behave that way because if you have n Strings then it would take a lot of runtime complexity to get to the actual value, so referencing to the actual value address is just straightforward.

  • @user-bt6wy2rb2z
    @user-bt6wy2rb2z Před měsícem

    💥💥💥💫

  • @kiranreddy1747
    @kiranreddy1747 Před 3 lety

    I want a playlist on advanced data structures

  • @shrikanthu8189
    @shrikanthu8189 Před rokem

    Sir How to get a variables memory address, can you give me code to it

  • @ParthDabhiOfficial
    @ParthDabhiOfficial Před 2 měsíci +1

    Thank You, Radha Radha

  • @anujshukla5634
    @anujshukla5634 Před 3 lety

    Sir ye wala nhi smjh aaya aur sb aa gya

  • @KeHan918
    @KeHan918 Před rokem

    Why is that i1 and i2 have different values as you mentioned in the last part. of video. In my view, they do have different adresses which make i1 and i2 are different. But they do have same value, because i2 is assigned value 5 from i1.

    • @suswithcherry9252
      @suswithcherry9252 Před 6 měsíci

      as they both stored in different addresses makes the values different.

  • @bugfixkh
    @bugfixkh Před 8 měsíci

    like like 👍🏻👍🏼