Does the String variables str1 and str2 share the same memory address? | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
+ 1

Does the String variables str1 and str2 share the same memory address?

String str1, str2, str3; str1="hallo" ; str2="Gold" ; str3=str1;

20th Aug 2019, 6:06 AM
Preet
2 Answers
+ 1
Seems <str1> share the same reference with <str3>.
20th Aug 2019, 7:07 AM
Ipang
0
No its not. Question is about str1 & str2
20th Aug 2019, 5:54 PM
Anand Waradpande
Anand Waradpande - avatar