Primitive Types and Reference Types in Java

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

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

  • @egehurturk6209
    @egehurturk6209 4 года назад +106

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

  • @mr.shuklashukla3259
    @mr.shuklashukla3259 4 года назад +21

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

  • @hakancemgercek
    @hakancemgercek Год назад +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.

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

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

  • @rahulkm3459
    @rahulkm3459 2 года назад +7

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

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

    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 Год назад

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

    • @suswithcherry9252
      @suswithcherry9252 10 месяцев назад

      @@farzin818 yes

  • @gamer-zy1uj
    @gamer-zy1uj 3 года назад +5

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

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

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

  • @maries.8809
    @maries.8809 Год назад

    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.

  • @jensjux4747
    @jensjux4747 4 года назад +8

    gj man. Why cant university teachers explain it like this

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

    U r the world's best teacher sir😍😍

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

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

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

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

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

    Energetic explanation that helps to understand the concept

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

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

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

    The best explanation ever....

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

    The best explanation ever

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

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

  • @Shivam-eh5fc
    @Shivam-eh5fc 4 года назад +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 4 года назад +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.

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

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

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

    You are a life saver man. Big ups!

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

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

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

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

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

    The accent made it even more intresting.

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

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

  • @mohamedmahmoud-bw8vb
    @mohamedmahmoud-bw8vb 4 года назад

    you are explaining with Abbreviated and awesome way 👍👏

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

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

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

    This made things so much clear. Thank You!

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

    The best explanation I have seen 👏 👌

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

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

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

    Bahut sahi sir ❤️🔥

  • @v.charanveerabathini808
    @v.charanveerabathini808 4 года назад +4

    Nice explanation

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

    Excellent class as usual

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

    the best explanation

    • @سيليناالمززززز
      @سيليناالمززززز 3 года назад

      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?

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

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

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

    This was the best explanation. I like it.

  • @mordecai8707
    @mordecai8707 3 года назад +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 😂

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

    Thank you so much you explained it so easily

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

    I love you Neso Academy. ❤️

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

    thank you soo much its so well explained good continuation

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

    Thanks for making such conceptual videos.

  • @smaylomoose6447
    @smaylomoose6447 4 года назад +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 4 года назад

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

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

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

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

    Great Explaination.
    Thank You.

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

    Excellent explanation!!

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

    Thanks for the explanation... ✨

  • @noumanrussel1112
    @noumanrussel1112 10 месяцев назад

    Amazingly done! Hats off

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

    This is an amazing explanation!

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

    very simple and objective

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

    Best explanation !!! Thank You

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

    nice concept u share;

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

    Nicely expained. Thank you so much

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

    Fantastic video, thank you!

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

    Thank You, Radha Radha

  • @hamzael-badaoui1736
    @hamzael-badaoui1736 8 месяцев назад

    great explination

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

    Great explanation!

  • @s.r.shuvadev9159
    @s.r.shuvadev9159 4 года назад

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

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

    Thanks

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

    thank you thank you thank you THANK YOU !

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

    Great explanation. keep it up!

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

    A great explanation....

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

    Excellent

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

    Very clear, thank you my friend)

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

    Thanks for this informative videos!

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

    Thankyou

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

    Very good job

  • @rajatsoni-07
    @rajatsoni-07 Год назад +1

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

    • @suswithcherry9252
      @suswithcherry9252 10 месяцев назад

      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.

  • @RaviShankar-ow9pu
    @RaviShankar-ow9pu 4 года назад +1

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

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

    very good explaination!

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

    really good! thank you!!!

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

    Thank you!

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

    thank you sir

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

    thanks man,finaly i catch it ❤

    • @سيليناالمززززز
      @سيليناالمززززز 3 года назад

      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 3 года назад +1

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

    • @سيليناالمززززز
      @سيليناالمززززز 3 года назад

      شكرا كثير

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

    Great video

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

    thank you so much

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

    thank you so much !

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

    amazing video!!!

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

    thank u so much bro

  • @haribhaii04
    @haribhaii04 10 месяцев назад

    Perfect!!

  • @s.....8353
    @s.....8353 4 года назад +1

    super

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

    Thank u

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

    🙌wonderful

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

    habibi tum nice explain karti

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

    I want a playlist on advanced data structures

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

    THANKS ALOTTTTTT

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

    legend

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

    great!!!

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

    the best...

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

    Love it

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

    Sir ye wala nhi smjh aaya aur sb aa gya

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

    perfect explains but alittle fast .

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

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

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

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

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

    Hmm 🤔 interesting

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

    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 10 месяцев назад

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

  • @AbhiTrade-ip4xx
    @AbhiTrade-ip4xx 2 месяца назад

    Why s2 not containing the address of s1? Why not s2 = s1 address?

  • @123jodo321
    @123jodo321 3 года назад

    strong

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

    I tried this in IntelliJ with a string and didn't work.
    I created 2 strings and assigned the 1st to the 2nd. Then I changed the value of s1 and printed both strings, but s2 did not change.
    program:
    _____________________________________________
    String s1 = "hello";
    String s2 = s1;
    System.out.println(s1);
    System.out.println(s2);

    s1="bye";
    System.out.println(s1);
    System.out.println(s2);
    Output:
    _______________________________________________
    hello
    hello
    bye
    hello
    _______________________________________________

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

      justpaulo when you stored S1 inside of S2 it’s like you made a copy of the (S1 “hello”;) inside of S2. Later on if you change the value of S1 it will not change S2

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

      Because String class is immutable

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

      @@b_b_d_b is there a way where i can change s1 using s2?

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

    thanks my Egyptian friend

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

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