Primitive Types and Reference Types in Java

  Рет қаралды 134,840

Neso Academy

Neso Academy

Күн бұрын

Пікірлер: 138
@egehurturk6209
@egehurturk6209 4 жыл бұрын
This was the best explanation of Reference types I've ever watched. This was awesome. Thank you
@mr.shuklashukla3259
@mr.shuklashukla3259 4 жыл бұрын
You are the greatest teacher ( who teach us free on KZbin ) ,ever in the youtube , for teaching java . 😍
@hakancemgercek
@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.
@rahulkm3459
@rahulkm3459 2 жыл бұрын
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 Жыл бұрын
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 11 ай бұрын
The reference address is stored in the stack(which contains the address/pointer) and its contents in the heap?
@suswithcherry9252
@suswithcherry9252 8 ай бұрын
@@farzin818 yes
@shivambhardwaj3273
@shivambhardwaj3273 2 жыл бұрын
Crisp, clear, to the point!! Hats off Neso Academy for making learning so efficient!
@YeeWaiyau
@YeeWaiyau Жыл бұрын
Have been struggling with the idea of reference variable and this amazing videos clear my doubts!!!
@gamer-zy1uj
@gamer-zy1uj 3 жыл бұрын
This is really best lecture on primitive and reference types.Nobody can explain like this.Thankyou sir for this amazing series🔥🔥🔥🔥🔥😊
@maries.8809
@maries.8809 9 ай бұрын
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 3 жыл бұрын
gj man. Why cant university teachers explain it like this
@v.charanveerabathini808
@v.charanveerabathini808 4 жыл бұрын
Nice explanation
@ashmitverma5612
@ashmitverma5612 3 жыл бұрын
My teacher is refering this vid and presenting it, Thank You!
@akashmohite3075
@akashmohite3075 3 жыл бұрын
Energetic explanation that helps to understand the concept
@alphagamer2864
@alphagamer2864 Ай бұрын
The best explanation I have seen 👏 👌
@Sulerhy
@Sulerhy 6 ай бұрын
This was the best explanation. I like it.
@vaishnavir1018
@vaishnavir1018 4 жыл бұрын
U r the world's best teacher sir😍😍
@p3t357
@p3t357 4 жыл бұрын
You're amazing teacher. I watched few movies on KZbin and I don't understood nothing. Thanks!!!.
@Omenemperor2
@Omenemperor2 5 ай бұрын
Thanks for this informative videos!
@whatsapwhatsapp662
@whatsapwhatsapp662 4 жыл бұрын
THANK YOU SO MUCH DEAR Lecturer for this good explanation and easy to understand videos. you are a genious. bless
@bipashajotwani7944
@bipashajotwani7944 5 ай бұрын
This is an amazing explanation!
@jonathanelmoznino3995
@jonathanelmoznino3995 4 жыл бұрын
Really great explanation and was very clear and on point. Thank You :)
@ismaciilibraahim3724
@ismaciilibraahim3724 11 ай бұрын
thankyo for clear explanation my teacher and i appreciate you millions times
@thrifterspoint1002
@thrifterspoint1002 4 жыл бұрын
nice concept u share;
@zahramahdavi9448
@zahramahdavi9448 Жыл бұрын
I watch so many videos and you are the best , I really understood the topic
@arlunguakh8661
@arlunguakh8661 Жыл бұрын
thank u so much! i was struggling to understand the difference but u explained it really well
@gaiedmahdi8791
@gaiedmahdi8791 9 ай бұрын
very simple and objective
@kingsmann_21
@kingsmann_21 3 жыл бұрын
Thank u very very much ......I'm suffering from this confusion for 1 month.
@user-ml9oi5rh9x
@user-ml9oi5rh9x 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?
@bringmygroozaaop5864
@bringmygroozaaop5864 3 жыл бұрын
@@user-ml9oi5rh9x ok
@user-ml9oi5rh9x
@user-ml9oi5rh9x 3 жыл бұрын
@@bringmygroozaaop5864 fatima_khaleel001 my insta
@jeanjulmis2347
@jeanjulmis2347 9 ай бұрын
Great explanation!
@mingillee3760
@mingillee3760 Жыл бұрын
What a clear explanation!! You saved my time!! I appreciate it
@teachkhmerbinary
@teachkhmerbinary Жыл бұрын
yes yes thank! for your video help in me to understand my teacher lesion.
@monjasonsteng7861
@monjasonsteng7861 7 ай бұрын
This was great. Thank you.
@mashapimatimba8063
@mashapimatimba8063 4 жыл бұрын
You are a life saver man. Big ups!
@aniketdeepeju0229
@aniketdeepeju0229 Жыл бұрын
Thanks for making such conceptual videos.
@vamsireddy6981
@vamsireddy6981 2 жыл бұрын
Best explanation,I am very clear about this now tq so much sir
@Shivam-eh5fc
@Shivam-eh5fc 4 жыл бұрын
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 жыл бұрын
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.
@babak4952
@babak4952 3 жыл бұрын
Very good job
@pointer7pl
@pointer7pl Жыл бұрын
primitive should me named ---> expresion type. amd all would be clear and understable :) Thank you man ! this was very good explaination
@anuragtiwari6910
@anuragtiwari6910 2 жыл бұрын
The best explanation ever....
@npl7740
@npl7740 10 ай бұрын
Great Explaination. Thank You.
@hamzael-badaoui1736
@hamzael-badaoui1736 5 ай бұрын
great explination
@mohamedmahmoud-bw8vb
@mohamedmahmoud-bw8vb 4 жыл бұрын
you are explaining with Abbreviated and awesome way 👍👏
@akshitsingh5108
@akshitsingh5108 3 жыл бұрын
The best explanation ever.
@moustafa_naguib
@moustafa_naguib 2 жыл бұрын
A great explanation....
@ashutoshawasthi
@ashutoshawasthi 2 жыл бұрын
Bahut sahi sir ❤️🔥
@noumanrussel1112
@noumanrussel1112 7 ай бұрын
Amazingly done! Hats off
@sing.along.with.ananya
@sing.along.with.ananya 2 жыл бұрын
Thank you so much you explained it so easily
@fire_krystal
@fire_krystal Жыл бұрын
thank you thank you thank you THANK YOU !
@dikatsogaleboe3640
@dikatsogaleboe3640 4 жыл бұрын
This made things so much clear. Thank You!
@nouhatamba9976
@nouhatamba9976 3 жыл бұрын
thank you soo much its so well explained good continuation
@ivanjakic1587
@ivanjakic1587 2 жыл бұрын
Great explanation. One question, why is important to know memory location etc..theory what is Refrence types vs Primitive types?
@Kalai_vaniG
@Kalai_vaniG 2 жыл бұрын
Thanks for the explanation... ✨
@s.....8353
@s.....8353 4 жыл бұрын
super
@haya_03
@haya_03 5 ай бұрын
thank you so much !
@rt7687
@rt7687 Жыл бұрын
Excellent class as usual
@dineshm3488
@dineshm3488 2 жыл бұрын
Excellent
@Dankake23
@Dankake23 Жыл бұрын
Very clear, thank you my friend)
@smaylomoose6447
@smaylomoose6447 4 жыл бұрын
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 3 жыл бұрын
If you just want to build apps I’d use dart, most oop languages carry the same logic with different syntax
@mrglitch2982
@mrglitch2982 3 жыл бұрын
the best explanation
@user-ml9oi5rh9x
@user-ml9oi5rh9x 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?
@haribhaii04
@haribhaii04 7 ай бұрын
Perfect!!
@boqizhu4522
@boqizhu4522 2 жыл бұрын
amazing video!!!
@soujanyavt
@soujanyavt 4 жыл бұрын
Nicely expained. Thank you so much
@dipeshsamrawat7957
@dipeshsamrawat7957 2 жыл бұрын
I love you Neso Academy. ❤️
@distractedbudha1859
@distractedbudha1859 3 жыл бұрын
thank you so much
@kenjohnsiosan9707
@kenjohnsiosan9707 2 жыл бұрын
thank you sir
@aakashtiwari3677
@aakashtiwari3677 3 жыл бұрын
Best explanation !!! Thank You
@mikeabordo6655
@mikeabordo6655 2 жыл бұрын
Thanks
@hishamkambal778
@hishamkambal778 2 жыл бұрын
thank u so much bro
@extems7895
@extems7895 3 жыл бұрын
Excellent explanation!!
@darshanamadushan1142
@darshanamadushan1142 2 жыл бұрын
Great explanation. keep it up!
@RaviShankar-ow9pu
@RaviShankar-ow9pu 4 жыл бұрын
Sir, can't wait to witness the neso aap !!!how much more will I have to wait???
@softwareeducation_per
@softwareeducation_per 2 жыл бұрын
🙌wonderful
@harshbhardwaj3542
@harshbhardwaj3542 3 жыл бұрын
Thankyou
@luqmannulhakiem4519
@luqmannulhakiem4519 3 жыл бұрын
very good explaination!
@aryanraje2770
@aryanraje2770 3 жыл бұрын
The accent made it even more intresting.
@in5125
@in5125 2 жыл бұрын
really good! thank you!!!
@I_am_Alxui
@I_am_Alxui 3 жыл бұрын
Thank u
@soap4890
@soap4890 2 жыл бұрын
THANKS ALOTTTTTT
@mohammedameer2365
@mohammedameer2365 4 жыл бұрын
thanks man,finaly i catch it ❤
@user-ml9oi5rh9x
@user-ml9oi5rh9x 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 жыл бұрын
ونصيحه وانتي بتشوفي الدبلومه حلي problem solving في موقع hackerrank بالتوازي مع الدبلومه
@user-ml9oi5rh9x
@user-ml9oi5rh9x 3 жыл бұрын
شكرا كثير
@ParthDabhiOfficial
@ParthDabhiOfficial 4 ай бұрын
Thank You, Radha Radha
@isurumadushan6774
@isurumadushan6774 3 жыл бұрын
great!!!
@rajatsoni-07
@rajatsoni-07 Жыл бұрын
5:30 How "hello" is getting stored in the memory without declaring a variable or a container?
@suswithcherry9252
@suswithcherry9252 8 ай бұрын
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.
@mockingspyhd6099
@mockingspyhd6099 3 жыл бұрын
Thank you!
@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.
@yuvrajsinghrathore1349
@yuvrajsinghrathore1349 Жыл бұрын
Love it
@steff420
@steff420 3 жыл бұрын
Great video
@ErenUS21
@ErenUS21 Жыл бұрын
the best...
@mordecai8707
@mordecai8707 3 жыл бұрын
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 😂
@abhishekgoswami9105
@abhishekgoswami9105 2 жыл бұрын
habibi tum nice explain karti
@bobertren3941
@bobertren3941 3 жыл бұрын
legend
@simulink9564
@simulink9564 2 жыл бұрын
Hmm 🤔 interesting
@KeHan918
@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.
@suswithcherry9252
@suswithcherry9252 8 ай бұрын
as they both stored in different addresses makes the values different.
@vigneshwaranravichandran8223
@vigneshwaranravichandran8223 3 жыл бұрын
Sir why reference type directly not store a value instead of storing a address of the value?? Pls clear my doubt?
@kiranreddy1747
@kiranreddy1747 3 жыл бұрын
I want a playlist on advanced data structures
@kiranreddy1747
@kiranreddy1747 3 жыл бұрын
through c++
@justpaulo
@justpaulo 4 жыл бұрын
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 жыл бұрын
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?
@ledajoro6965
@ledajoro6965 4 жыл бұрын
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 4 жыл бұрын
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
@shrikanthu8189 Жыл бұрын
Sir How to get a variables memory address, can you give me code to it
@parthpandya2909
@parthpandya2909 4 жыл бұрын
How to make reference variable of int?????
@123jodo321
@123jodo321 2 жыл бұрын
strong
@mahdimohebi5790
@mahdimohebi5790 7 ай бұрын
perfect explains but alittle fast .
@falconheavy595
@falconheavy595 Жыл бұрын
thanks my Egyptian friend
Instantiating a String Object
5:23
Neso Academy
Рет қаралды 65 М.
JavaScript - Reference vs Primitive Values/ Types
20:56
Academind
Рет қаралды 153 М.
He bought this so I can drive too🥹😭 #tiktok #elsarca
00:22
Elsa Arca
Рет қаралды 45 МЛН
Angry Sigma Dog 🤣🤣 Aayush #momson #memes #funny #comedy
00:16
ASquare Crew
Рет қаралды 48 МЛН
Apple peeling hack
00:37
_vector_
Рет қаралды 62 МЛН
Primitives Data Types In Java - All the Primitives And What They Do
10:24
Master Pointers in C:  10X Your C Coding!
14:12
Dave's Garage
Рет қаралды 304 М.
Primitive and Reference (Object) Types in Memory (Java Tutorial)
5:12
Variables in Java ✘【12 minutes】
12:32
Bro Code
Рет қаралды 198 М.
Calling String Methods in Java
10:34
Neso Academy
Рет қаралды 90 М.
Pass By Value and Pass By Reference In Java | Java Tutorials
26:02
you will never ask about pointers again after watching this video
8:03
Low Level Learning
Рет қаралды 2,2 МЛН
Premature Optimization
12:39
CodeAesthetic
Рет қаралды 803 М.