+ 1
What is the difference between String and Variable?
This question is related to Java... thx for helping me 😊😊😊
4 odpowiedzi
0
A Variable is a store of information, and a String is a type of information you would store in a Variable. A String is usually words, enclosed with ""
Eg
String x ="Welcome to SoloLearn"
X is the Variable, and we declared it as a String, use the single = to assign the text to it.
+ 7
string a class .... reference datatype ... it is used to represent text type data...
variable is any alphabet or gropu of alphabet which work as temporary storage locations , a variable is used to represent any value
example :::
String x="anand";
// here x is variable and type of value it stores is in string
0
thx
0
Difference between string and variable