Can anyone answer this question? | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
+ 2

Can anyone answer this question?

Is ref (reference variable) a variable that stores the memory address?

8th Jul 2020, 3:42 PM
Ajoh Pv
Ajoh Pv - avatar
2 Answers
+ 2
The reference variables, like arrays variables, instances of clases (objects)... are implemented by a name or reference (pointer) that contains the memory address of a value or set of values; when you use "new" keyword, you are gaining space in heap area to store a reference variable...
8th Jul 2020, 4:27 PM
Jesús Roberto GR 🇲🇽
Jesús Roberto GR 🇲🇽 - avatar