This was the best explanation of Reference types I've ever watched. This was awesome. Thank you
@mr.shuklashukla32594 жыл бұрын
You are the greatest teacher ( who teach us free on KZbin ) ,ever in the youtube , for teaching java . 😍
@hakancemgercek Жыл бұрын
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.
@rahulkm34592 жыл бұрын
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 Жыл бұрын
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
@farzin81811 ай бұрын
The reference address is stored in the stack(which contains the address/pointer) and its contents in the heap?
@suswithcherry92528 ай бұрын
@@farzin818 yes
@shivambhardwaj32732 жыл бұрын
Crisp, clear, to the point!! Hats off Neso Academy for making learning so efficient!
@YeeWaiyau Жыл бұрын
Have been struggling with the idea of reference variable and this amazing videos clear my doubts!!!
@gamer-zy1uj3 жыл бұрын
This is really best lecture on primitive and reference types.Nobody can explain like this.Thankyou sir for this amazing series🔥🔥🔥🔥🔥😊
@maries.88099 ай бұрын
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.
@jensjux47473 жыл бұрын
gj man. Why cant university teachers explain it like this
@v.charanveerabathini8084 жыл бұрын
Nice explanation
@ashmitverma56123 жыл бұрын
My teacher is refering this vid and presenting it, Thank You!
@akashmohite30753 жыл бұрын
Energetic explanation that helps to understand the concept
@alphagamer2864Ай бұрын
The best explanation I have seen 👏 👌
@Sulerhy6 ай бұрын
This was the best explanation. I like it.
@vaishnavir10184 жыл бұрын
U r the world's best teacher sir😍😍
@p3t3574 жыл бұрын
You're amazing teacher. I watched few movies on KZbin and I don't understood nothing. Thanks!!!.
@Omenemperor25 ай бұрын
Thanks for this informative videos!
@whatsapwhatsapp6624 жыл бұрын
THANK YOU SO MUCH DEAR Lecturer for this good explanation and easy to understand videos. you are a genious. bless
@bipashajotwani79445 ай бұрын
This is an amazing explanation!
@jonathanelmoznino39954 жыл бұрын
Really great explanation and was very clear and on point. Thank You :)
@ismaciilibraahim372411 ай бұрын
thankyo for clear explanation my teacher and i appreciate you millions times
@thrifterspoint10024 жыл бұрын
nice concept u share;
@zahramahdavi9448 Жыл бұрын
I watch so many videos and you are the best , I really understood the topic
@arlunguakh8661 Жыл бұрын
thank u so much! i was struggling to understand the difference but u explained it really well
@gaiedmahdi87919 ай бұрын
very simple and objective
@kingsmann_213 жыл бұрын
Thank u very very much ......I'm suffering from this confusion for 1 month.
@user-ml9oi5rh9x3 жыл бұрын
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?
@bringmygroozaaop58643 жыл бұрын
@@user-ml9oi5rh9x ok
@user-ml9oi5rh9x3 жыл бұрын
@@bringmygroozaaop5864 fatima_khaleel001 my insta
@jeanjulmis23479 ай бұрын
Great explanation!
@mingillee3760 Жыл бұрын
What a clear explanation!! You saved my time!! I appreciate it
@teachkhmerbinary Жыл бұрын
yes yes thank! for your video help in me to understand my teacher lesion.
@monjasonsteng78617 ай бұрын
This was great. Thank you.
@mashapimatimba80634 жыл бұрын
You are a life saver man. Big ups!
@aniketdeepeju0229 Жыл бұрын
Thanks for making such conceptual videos.
@vamsireddy69812 жыл бұрын
Best explanation,I am very clear about this now tq so much sir
@Shivam-eh5fc4 жыл бұрын
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”
@raywinter87334 жыл бұрын
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.
@babak49523 жыл бұрын
Very good job
@pointer7pl Жыл бұрын
primitive should me named ---> expresion type. amd all would be clear and understable :) Thank you man ! this was very good explaination
@anuragtiwari69102 жыл бұрын
The best explanation ever....
@npl774010 ай бұрын
Great Explaination. Thank You.
@hamzael-badaoui17365 ай бұрын
great explination
@mohamedmahmoud-bw8vb4 жыл бұрын
you are explaining with Abbreviated and awesome way 👍👏
@akshitsingh51083 жыл бұрын
The best explanation ever.
@moustafa_naguib2 жыл бұрын
A great explanation....
@ashutoshawasthi2 жыл бұрын
Bahut sahi sir ❤️🔥
@noumanrussel11127 ай бұрын
Amazingly done! Hats off
@sing.along.with.ananya2 жыл бұрын
Thank you so much you explained it so easily
@fire_krystal Жыл бұрын
thank you thank you thank you THANK YOU !
@dikatsogaleboe36404 жыл бұрын
This made things so much clear. Thank You!
@nouhatamba99763 жыл бұрын
thank you soo much its so well explained good continuation
@ivanjakic15872 жыл бұрын
Great explanation. One question, why is important to know memory location etc..theory what is Refrence types vs Primitive types?
@Kalai_vaniG2 жыл бұрын
Thanks for the explanation... ✨
@s.....83534 жыл бұрын
super
@haya_035 ай бұрын
thank you so much !
@rt7687 Жыл бұрын
Excellent class as usual
@dineshm34882 жыл бұрын
Excellent
@Dankake23 Жыл бұрын
Very clear, thank you my friend)
@smaylomoose64474 жыл бұрын
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?
@drewarocha423 жыл бұрын
If you just want to build apps I’d use dart, most oop languages carry the same logic with different syntax
@mrglitch29823 жыл бұрын
the best explanation
@user-ml9oi5rh9x3 жыл бұрын
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?
@haribhaii047 ай бұрын
Perfect!!
@boqizhu45222 жыл бұрын
amazing video!!!
@soujanyavt4 жыл бұрын
Nicely expained. Thank you so much
@dipeshsamrawat79572 жыл бұрын
I love you Neso Academy. ❤️
@distractedbudha18593 жыл бұрын
thank you so much
@kenjohnsiosan97072 жыл бұрын
thank you sir
@aakashtiwari36773 жыл бұрын
Best explanation !!! Thank You
@mikeabordo66552 жыл бұрын
Thanks
@hishamkambal7782 жыл бұрын
thank u so much bro
@extems78953 жыл бұрын
Excellent explanation!!
@darshanamadushan11422 жыл бұрын
Great explanation. keep it up!
@RaviShankar-ow9pu4 жыл бұрын
Sir, can't wait to witness the neso aap !!!how much more will I have to wait???
@softwareeducation_per2 жыл бұрын
🙌wonderful
@harshbhardwaj35423 жыл бұрын
Thankyou
@luqmannulhakiem45193 жыл бұрын
very good explaination!
@aryanraje27703 жыл бұрын
The accent made it even more intresting.
@in51252 жыл бұрын
really good! thank you!!!
@I_am_Alxui3 жыл бұрын
Thank u
@soap48902 жыл бұрын
THANKS ALOTTTTTT
@mohammedameer23654 жыл бұрын
thanks man,finaly i catch it ❤
@user-ml9oi5rh9x3 жыл бұрын
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?
@mohammedameer23653 жыл бұрын
ونصيحه وانتي بتشوفي الدبلومه حلي problem solving في موقع hackerrank بالتوازي مع الدبلومه
@user-ml9oi5rh9x3 жыл бұрын
شكرا كثير
@ParthDabhiOfficial4 ай бұрын
Thank You, Radha Radha
@isurumadushan67743 жыл бұрын
great!!!
@rajatsoni-07 Жыл бұрын
5:30 How "hello" is getting stored in the memory without declaring a variable or a container?
@suswithcherry92528 ай бұрын
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.
@mockingspyhd60993 жыл бұрын
Thank you!
@s.r.shuvadev91594 жыл бұрын
Awesome. But we are waiting for reamainder video in c programming and data structure series. Please sir make reamainder video as soon as possible.
@yuvrajsinghrathore1349 Жыл бұрын
Love it
@steff4203 жыл бұрын
Great video
@ErenUS21 Жыл бұрын
the best...
@mordecai87073 жыл бұрын
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 😂
@abhishekgoswami91052 жыл бұрын
habibi tum nice explain karti
@bobertren39413 жыл бұрын
legend
@simulink95642 жыл бұрын
Hmm 🤔 interesting
@KeHan918 Жыл бұрын
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.
@suswithcherry92528 ай бұрын
as they both stored in different addresses makes the values different.
@vigneshwaranravichandran82233 жыл бұрын
Sir why reference type directly not store a value instead of storing a address of the value?? Pls clear my doubt?
@kiranreddy17473 жыл бұрын
I want a playlist on advanced data structures
@kiranreddy17473 жыл бұрын
through c++
@justpaulo4 жыл бұрын
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_b4 жыл бұрын
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
@aldopassio62303 жыл бұрын
Because String class is immutable
@hetaeramancer3 жыл бұрын
@@b_b_d_b is there a way where i can change s1 using s2?
@ledajoro69654 жыл бұрын
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?
@rubendariofrancodiaz69444 жыл бұрын
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.
@shrikanthu8189 Жыл бұрын
Sir How to get a variables memory address, can you give me code to it