What is reference variable? | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
+ 1

What is reference variable?

2nd Feb 2019, 11:24 AM
Dina Noviana
7 Answers
+ 2
There are two types of variables: 1- Primitive variables : those are the known variables with known data types, such as (int x , float y) and these variables contains data. 2- Reference variables : those are variables contains addresses to locations in memory , and they don't contains data.
2nd Feb 2019, 11:55 AM
Mr Robot
Mr Robot - avatar
+ 2
So, when we should use primitive or reference variable?
2nd Feb 2019, 12:56 PM
Dina Noviana
+ 2
Check this video if not understand on SL https://youtu.be/eRfvgSvf-mM
2nd Feb 2019, 2:19 PM
Mr Robot
Mr Robot - avatar
+ 2
I would recommend using this site its does such a nice job at explaining pretty much anything you need to know about Java with lots of examples, i use it with SoloLearn quite often, together they make the perfect teacher you need lel https://kodejava.org/what-is-reference-variable-in-java/
2nd Feb 2019, 2:49 PM
Kalley
Kalley  - avatar
+ 1
https://www.sololearn.com/learn/Java/2158/
2nd Feb 2019, 2:16 PM
Mr Robot
Mr Robot - avatar
+ 1
Oke, thanks for your nice answer
2nd Feb 2019, 2:41 PM
Dina Noviana
+ 1
Ooh thank you Kalley
2nd Feb 2019, 2:52 PM
Dina Noviana